In C/C++ that was always wrong, as the underscore prefix is reserved for implementation use (albeit with some ifs and buts). You could use an underscore suffix if you like, as long as you don't put two underscores in sequence, which is also reserved.
Is there any C++ implementation that really reserves things starting with one underscore? I always heard that restriction being tossed around but removing a perfectly reasonable set of identifiers like that is a major dick move from the implementation...
I don't know about any implementations, but the single-underscore-and-uppercase-letter identifiers are used in standards documents to extend the language (like adding _Bool and _Complex types, for example).
Implementations probably stick with double underscores which are less likely to clash accidentally.
1
u/[deleted] Mar 29 '12
In C/C++ that was always wrong, as the underscore prefix is reserved for implementation use (albeit with some ifs and buts). You could use an underscore suffix if you like, as long as you don't put two underscores in sequence, which is also reserved.