Export (0) Print
Expand All

22 __identifier Keyword

Visual Studio .NET 2003

The __identifier keyword provides a mechanism to treat a C++ keyword as if it were actually an identifier. This is sometimes required when using classes written in another language. For example, an imported class can be named "operator". Without the __identifier keyword, C++ code could not make use of this class.


#using <mscorlib.dll>
#using "operator.dll"   // contains "operator" class

void () {
   __identifier(operator) *pO = new __identifier(operator);


  • The __identifier keyword can appear anywhere a C++ identifier can legally appear.


  • The argument to __identifier shall be a C++ keyword.
© 2014 Microsoft