Keywords are predefined reserved identifiers that have special meanings. They cannot be used as identifiers in your program. The following keywords are reserved for Microsoft C++. Names with leading underscores, and names followed by (C++/CLI) are Microsoft extensions.
1 Extended attributes for the __declspec keyword.
2 Applicable to Managed Extensions for C++ only. This syntax is now deprecated. See Component Extensions for Runtime Platforms for more information.
3 Intrinsic function used in event handling.
4 For backward compatibility with previous versions, these keywords are available both with two leading underscores and a single leading underscore when Microsoft extensions are enabled (the default).
In Microsoft C++, identifiers with two leading underscores are reserved for compiler implementations. Therefore, the Microsoft convention is to precede Microsoft-specific keywords with double underscores. These words cannot be used as identifier names.
Microsoft extensions are enabled by default. To ensure that your programs are fully portable, you can disable Microsoft extensions by specifying the /Za (Disable language extensions) option during compilation. When you do this, some Microsoft-specific keywords are disabled.
When Microsoft extensions are enabled, you can use the Microsoft-specific keywords in your programs. For ANSI compliance, these keywords are prefaced by a double underscore. For backward compatibility, single-underscore versions of many of the double-underscored keywords are supported. In addition, __cdecl is available with no leading underscore.
The __asm keyword replaces C++
asm is reserved for compatibility with other C++ implementations, but not implemented. Use __asm.
The __based keyword has limited uses for 32-bit and 64-bit target compilations.
END Microsoft Specific
Send feedback about: