Pre-defined Compiler Macros

September 20, 2014 in C, C++, Programming, Source Code, Tips & Tricks by admin

c++C and C++ compilers automatically define certain macros that can be used to check for compiler or operating system features. This is useful when writing portable software.

This link goes to a wiki page where subpages pagesĀ  list various pre-defined compiler macros that can be used to identify standards, compilers, operating systems, hardware architectures, and even basic run-time libraries at compile-time.