Boost C++ Libraries: Ticket #4353: warning needs suppressed --> warning: "_MSC_VER" is not defined https://svn.boost.org/trac10/ticket/4353 <p> The warning situates here: boost/range.hpp:18:5: warning: "_MSC_VER" is not defined </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4353 Trac 1.4.3 Steven Watanabe Wed, 16 Jun 2010 22:22:11 GMT component changed; owner set https://svn.boost.org/trac10/ticket/4353#comment:1 https://svn.boost.org/trac10/ticket/4353#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Neil Groves</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">range</span> </li> </ul> Ticket mdorey@… Sun, 20 Jun 2010 20:01:02 GMT attachment set https://svn.boost.org/trac10/ticket/4353 https://svn.boost.org/trac10/ticket/4353 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">D51645.patch</span> </li> </ul> <p> fix in the style of the earlier test in this file </p> Ticket mdorey@… Sun, 20 Jun 2010 20:09:48 GMT <link>https://svn.boost.org/trac10/ticket/4353#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4353#comment:2</guid> <description> <p> It's perhaps stating the obvious, but nonetheless worth doing so for the benefit of search engines, that this warning occurs with gcc when passed the -Wundef flag. (This little-known and rarely-used flag is useful because it stops you from doing #if tests when the appropriate header file hasn't been included.) Much of boost is clean in the presence of this flag and I've had other similar patches accepted in the past. Another technique that's sometimes used to fix this sort of issue is BOOST_WORKAROUND, as demonstrated in eg <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/1291"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/1291</a>. I didn't choose that approach because I'm less familiar with it and I was concerned for consistency with the existing defined(_MSC_VER) test higher up this file. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Neil Groves</dc:creator> <pubDate>Sat, 17 Jul 2010 19:55:00 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4353#comment:3 https://svn.boost.org/trac10/ticket/4353#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket