Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 450 Bytes

FeatureMacros.md

File metadata and controls

15 lines (11 loc) · 450 Bytes

Feature Macros

Rather than checking for specific compilers directly in the code, consider using the compiler macros to set feature macros, and then use these feature macros in your code.

#if defined(PREDEF_COMPILER_MSC)
# define HAVE_WINDOWS_H 1
#endif

#if defined(HAVE_WINDOWS_H)
# include <windows.h>
#endif

An example of this can be found in Boost.Config.