Talk:cpp/language/operator alternative

I don't really think that including the digraphs/trigraphs here is very intuitive. It would probably make more sense to include it on the general language page, or to put it on its own page. --- Undeterminant 19:00, 7 March 2012 (PST)


 * I agree that having digraphs on a page titled "operator_alternative" seems odd. What if we leave all the alternative representations together, but put them on a page titled "alternative representations" and link to it under the "misc" section on the language page?  Nate 04:32, 8 March 2012 (PST)

Strictly speaking, it is not correct to call the identifier-like alternative tokens "keywords". These alternative tokens are in the same lexical category as digraphs, i.e. preprocessing-op-or-punc of preprocessing-token, but not keyword of token, though they would be converted into the latter in translation phase 7. Thus they are not in the keyword table in ISO C++. Note that "delete" and "new" are also in this category and would be converted, but their converted form remain lexical equivalence (and thus appear in the keyword table), so nothing wrong to say "new and delete are C++ keywords". Better reconstruct this page? --FrankHB (talk) 07:27, 12 September 2013 (PDT)


 * You're correct, strictly speaking. I renamed them to "alternative tokens" throughout this page. --Cubbi (talk) 13:55, 20 November 2014 (PST)

Missing %:%: alternative for ##
The digraphs/trigraph table implies that %: can universally be used as an alternative to #. A strict interpretation of that would imply that #%: and %:# would be alternative forms of ##, but they are not. In fact, the table in lex.digraphs explicitly calls out the alternative representation of ## as only %:%:. But that is not conveyed clearly in the tables here. Unfortunately, with how the information is presented here, I'm not sure what the cleanest way to indicate this would be, since technically, %:%: is not a digraph (a quadgraph?).


 * I agree, this page should be clearer that digraphs (unlike trigraphs) operate on tokens, not on raw characters, and the alternative token is missing. Let's see if it can be fixed.. --Cubbi (talk) 14:17, 7 December 2016 (PST)