<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to FeatureMacros</title><link>https://sourceforge.net/p/predef/wiki/FeatureMacros/</link><description>Recent changes to FeatureMacros</description><atom:link href="https://sourceforge.net/p/predef/wiki/FeatureMacros/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 01 Aug 2012 09:54:13 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/predef/wiki/FeatureMacros/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage FeatureMacros modified by Bjorn Reese</title><link>https://sourceforge.net/p/predef/wiki/FeatureMacros/</link><description>## 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.

    :::c
    #if defined(PREDEF_COMPILER_MSC)
    # define HAVE_WINDOWS_H 1
    #endif

    #if defined(HAVE_WINDOWS_H)
    # include &lt;windows.h&gt;
    #endif

An example of this can be found in [Boost.Config](http://www.boost.org/doc/libs/1_47_0/libs/config/doc/html/index.html).
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bjorn Reese</dc:creator><pubDate>Wed, 01 Aug 2012 09:54:13 -0000</pubDate><guid>https://sourceforge.netb5c40fe4996c23096496226952b4232f5133392b</guid></item></channel></rss>