

Otherwise, undefined.ĭefined as the integer literal value 200406 when compiled as C++ and a /clr compiler option is set. See the source document for a good example.ĭefined as an integer literal value when the translation unit is compiled as C++.

COUNTER remembers its state when you use precompiled headers. Otherwise, undefined.Įxpands to an integer literal that starts at 0 and is incremented by 1 every time it is used in a source file or included headers of the source file. Otherwise, undefined.ĭefined as 1 when the /guard:cf (Enable Control Flow Guard) compiler option is set. _CLR_VER is defined if the /clr compiler option is set. The value is encoded in the form Mmmbbbbb, where M is the major version of the runtime, mm is the minor version of the runtime, and bbbbb is the build number. Otherwise, undefined.ĭefined as an integer literal that represents the version of the common language runtime used when the application was compiled. This is set when the /J (Default char Type Is unsigned) compiler option is set. Otherwise, undefinedĭefined as 1 if the default char type is unsigned. Otherwise, undefined.ĭefined as 1 when the /arch:AVX2 compiler option is set and the compiler target is x86 or 圆4. Otherwise, undefined.ĭefined as 1 when the /arch:AVX or /arch:AVX2 compiler options are set and the compiler target is x86 or 圆4. |Defined in as an integer literal that encodes the MFC version number.ĭefined as 1 when the /favor:ATOM compiler option is set and the compiler target is x86 or 圆4. The CL Switch column lists the pertinent Visual C++ command line compiler switches these are the switches mentioned in the adjacent Details column.ĭefined in as an integer literal that encodes the ATL version number.For the most part, the everyday macros are either defined with a value of 1 or are undefined. The Range column lists the single value or range of values that may be assigned to the macro.The macros are shown alphabetically by macro name, without regard to whether they are standard or Microsoft-specific use the Status column to determine which are standard and which are MS only.The following table contains the same information that appears in the Microsoft article, but I think this table is easier to read and use as a cheat sheet. Since I seem to be needing quick access to more of these switches, I decided that it was worth spending an hour or two to format it in a way that seems more useful to me, because it puts the compiler switches, macro values, and references to related pages of the compiler documentation into separate columns, so that they are easy to find. Like many of the lists and charts published by Microsoft, the format of the Predefined Macros list leaves a lot to be desired. Seeing these macros gave me an idea for a better approach to another problem that I had already solved by another method that was quite a bit less elegant. Recently, in the course of researching a coding issue related to a straight C program that I was developing, I noticed some Microsoft-specific predefined C/C++ preprocessor macros that I hadn't noticed before.

#Full page switch visual composer free download#
Download NOTESPredefined_C_and_C_Macros.zip - 25.4 KB.
