Built-In Macros

A handful of macros are built in to the C++ compiler (C1XX). These are not just pre-defined through /D options generated by CL.EXE, whether by default or as implications of other options. They are truly built-in. Attempts to redefine or undefine them through #define or #undef directives are ignored, with a warning (C4117).

In the following list of macros that Microsoft Visual C++ version 13.00.9466 may treat as built-in, those that Microsoft does not document among the Predefined Macros are highlighted yellow. A highlight does not mean that the macro is undocumented, just that it is not included in what the documentation seems to present as its master list. For instance, the only mention of the __BOOL_DEFINED macro seems to be in the documentation of the bool keyword.

Some identifiers become built-in macros only in some conditions, mainly depending on command-line options. Where the table below lists no condition, the identifier is recognised as a built-in macro by the C++ compiler in all circumstances.

__BOOL_DEFINED if not /noBool
_NATIVE_WCHAR_T_DEFINED if /Zc:wchar_t and not /Yu
_WCHAR_T_DEFINED if /Zc:wchar_t and not /Yu