Does C++11 allow dollar signs in identifiers?
Are dollar-signs allowed in identifiers in C++03? covers that dollar signs in identifiers are not allowed in C++03. GCC provides it as a C extension and properly gives a diagnostic in C++03 mode. However, in C++11, int $ = 0 will compile without warning. This answer reasons that $ may be allowed because no diagnostic is required for implementation defined identifiers: The answer here is "Maybe" : According to §2.11 , identifiers may consist of digits and identifier-nondigits , starting with one of the latter. identifier-nondigits are the usual a-z , A-Z and underscore, in addition since C++11