Approved: Fortect
If you’ve noticed #ifdef win32 msdn, this article may help you.
__ATOM__
Defined as 1 if / Favor: ATOM
is a compiler option and each of our compiler targets is x86 Where … it’s x64. Otherwise undefined.
__AVX__
As defined 1 if / arch: AVX
, / arch: AVX2
and even the compiler options / arch: AVX512
are set and the compiler target is x86 instead of x64. Otherwise undefined.
__AVX2__
Defined as 1 if one of our / arch: AVX2
or / arch: AVX512
The options compiler is tv and the target compiler is x86 or possibly x64. Otherwise undefined.
__AVX512BW__
Defined as 1, if you are the compiler / arch: AVX512
, the option is set and the compiler – Target is x86, or it could be x64. Otherwise undefined.
In native C, the #ifdef directive enables conditional compilation. The preprocessor determines whether a supplied macro exists before that particular subsequent code is included in the compilation process.
__AVX512CD__
Defined as 1 if this / arch: AVX512
compiler option is set and the compiler target is x86 or x64. Otherwise undefined.
__AVX512DQ__
As defined 1 if actual compiler option / arch: AVX512
is set and global compiler target is x86 or x64. Otherwise undefined.
What is _WIN32 macro?
__AVX512F__
Defined as 1 if the compiler option / arch: avx512
is set and the compiler target is x86 or x64. Otherwise undefined.
What is _WIN32_WINNT?
__AVX512VL__
Defined as 1 if the compiler resolution is set to / arch: AVX512
and the target compiler is very powerful x86. or. it’s x64. Otherwise undefined.
_CHAR_UNSIGNED
Defined because 1 is a standard type if char
is definitely unsigned. This value is set if the / J
(standard unsigned character type) compiler is set in the rule parameter. Otherwise undefined.
__CLR_VER
Defined because an integer literal represents the CLR publication used to compile the application. The value is actually encoded in Mmmbbbb
, specifically where M
is the major version of the reader, mm
is the minor version of the entire runtime, and bbbbb
– build sum. __CLR_VER
is set if the compiler response is / clr
. Otherwise undefined.
// clr_ver.cpp// build with: / clrUsing the namespace system;int main () Console :: WriteLine (__ CLR_VER);
The #ifdef directive controls the conditional compilation of a high-performance resource file by checking the specified name. If the name is unspecified, #ifdef tells the compiler to ignore the instructions until the next #endif information.
_CONTROL_FLOW_GUARD
Defined as 1 if each flow compiler routine is / guard: cf
(Enable Control Guard) . Otherwise undefined.
__COUNTER__
Expands to a large literal integerA which starts at 0. The treat is increased by 1 each time it is used in the source file or in headers included from the primary element file. __COUNTER__
remembers its status when you receive precompiled headers. This macro is usually defined. Example
__COUNTER__
is used here to assign extraordinary identifiers to three different Identical objects. exampleClass
uses the Wonderful Integer constructor as a parameter. In main
, the device declares three types of exampleClass
objects and uses __COUNTER__
as the unique identifier parameter:
WIN32 is defined around Windows header files, but you can pass it to the compiler as well (eg “-DWIN32” for gcc).
// macro __COUNTER __. Demo cpp// from __COUNTER__ assign unique identifiers// several objects of the same type.// Compiling with: cl / EHsc / W4 macro__COUNTER __. Cpp#include Example class class int m_nID;publicly: // Initialize the object with a unique read-only identifier exampleClass (int nID): m_nID (nID) int GetID (void) return m_nID;;int main () // __COUNTER__ is initially defined as 0 exampleClass e1 (__ COUNTER__); // For the second link __COUNTER__ Is now listed as 1 ExampleClass e2 (__ COUNTER__); // __COUNTER__ is defined as 2 at this time exampleClass e3 (__ COUNTER__); printf ("e1.ID:% i n", e1.GetID ()); printf ("e2% i n", #: e2.GetID ()); printf ("e3% i n", detection: e3.GetID ()); // Log out // ------------------------------------------- // Identifier e1: 0 // ID e2: 1 // ID e3: 2 Returns 0;
__cplusplus_cli
Defined as an integer real value 200406 when compiled in C ++, also defined as / clr
compiler option. Otherwise undefined. If defined, __cplus_cli
is active in the translation unit.
// cplusplus_cli.cpp// compile with "stdio / clr."# include.h "int main () #ifdef __cplusplus_cli printf ("% d n", __cplusplus_cli); #another printf ("undefined n"); #end if
__cplusplus_winrt
Defined as an integer actual value 201009 when compiled in C ++ and exact / ZW
(compiling Windows Runtime) – The compiler option is set without a doubt. Otherwise undefined.
_CPPRTTI
Defined as 1, you can set the compiler option / GR
(include runtime information) . In productionOtherwise not defined.
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
_CPPUNWIND
Defined as 1 only if one or more of these / GX
(allow exception handling) , / clr
Language (general runtime compilation) or / EH
(exception handling model) The compiler options are defined. Otherwise undefined.
_DEBUG
Defined as 1 if / MDd
, / ldd
or maybe even the / MTd
compiler option is set. Otherwise undefined.
_DLL
Defined as 1 if / MD
or even (multithreaded / mdd
DLL) Get the compiler option. Otherwise undefined.
__FUNCDNAME__
Defines the actual value as a string that contains the decorated name of the person’s inclusive function. The macro is only required in a function. The __FUNCDNAME__
macro really expands when you add / EP
to / P
Use the option compiler.
This example uses specific __FUNCDNAME__
, __FUNCSIG__
, __FUNCTION__
to display information about the offer.
// Demonstration of the functionality of macros __FUNCTION__, __FUNCDNAME__ and even __FUNCSIG__void exampleFunction () printf ("Function name:% s n", __FUNCTION__); printf ("Decorated function name:% s n", __FUNCDNAME__); printf ("Signature function:% s n", __FUNCSIG__); // example output // ------------------------------------------------ - Function // Name: exampleFunction // Name of the function to decorate:? Example @@ YAXXZ Function Function // Signature: void __cdecl exampleFunction (void)
__FUNCSIG__
Defined even as a string literal containing the visa of the enclosing function. A macro should only be defined in a function. The __FUNCSIG__
macro does not expand if you use the custom / ep
/ P
. When collected for a 64-bit target, the calling runtime defaults to __cdecl
. You can find a related usage example in the __FUNCDNAME__
macro.
__FUNCTION__
Defined as a string literal containing the fully qualified name of the enclosing function, without decoration. The macro is only defined within the target. macro__FUNCTION__
does not expand if your entire family is / EP
or / P
<. use / a> good luck compiler. You can find an example of its use in the __FUNCDNAME__
macro.
_INTEGRAL_MAX_BITS
Defined as the current integer value 64, maximum size in bits (in for a non-vector integer type. This macro is often always defined.
// integral_max_bit.cpp#include
Speed up your computer's performance now with this simple download.int main () printf ("% d n", defined by _integral_max_bits); Where is WIN32 defined?