FeatureMacros

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.


Related

Wiki: Home

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks