Back to categories

Category: C++

Using Predefined Compiler Macros in C and C++

C and C++ compilers provide a set of predefined macros which can be used to detect a wide variety of build settings and target properties at compile time. Combining them with the preprocessor allows for platform-specific code to be guarded at compile time.