Boost C++ Libraries: Ticket #8403: VC++ 2012 compiler warning C4127: conditional expression is constant https://svn.boost.org/trac10/ticket/8403 <p> I'm using Microsoft Visual Studio 2012 to compile boost 1.52.0. I use compiler flag /W4. The following warnings (which we declared errors for our project) occur in geometry, regardless whether I'm compiling for x64 or x86: </p> <pre class="wiki">\boost_1_52_0\boost\geometry\algorithms\convert.hpp(96): error C4127: conditional expression is constant if (Close) ... </pre><pre class="wiki">\boost_1_52_0\boost\geometry\algorithms\detail\overlay\get_turns.hpp(263): error C4127: conditional expression is constant if (InterruptPolicy::enabled) ... </pre><pre class="wiki">\boost_1_52_0\boost\geometry\algorithms\num_points.hpp(51): error C4127: conditional expression is constant if (s == open) ... </pre><p> Maybe it's possible to eliminate those warnings for the next boost version? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8403 Trac 1.4.3 Volker Schöch <vschoech@…> Fri, 05 Apr 2013 15:06:06 GMT <link>https://svn.boost.org/trac10/ticket/8403#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8403#comment:1</guid> <description> <p> Sorry, I mixed the code with the message. Unfortunately I cannot edit the original post, so here are the messages with the correct line breaks: </p> <pre class="wiki">\boost_1_52_0\boost\geometry\algorithms\convert.hpp(96): error C4127: conditional expression is constant if (Close) ... </pre><pre class="wiki">\boost_1_52_0\boost\geometry\algorithms\detail\overlay\get_turns.hpp(263): error C4127: conditional expression is constant if (InterruptPolicy::enabled) ... </pre><pre class="wiki">\boost_1_52_0\boost\geometry\algorithms\num_points.hpp(51): error C4127: conditional expression is constant if (s == open) ... </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Barend Gehrels</dc:creator> <pubDate>Fri, 05 Apr 2013 20:58:09 GMT</pubDate> <title>type, severity changed https://svn.boost.org/trac10/ticket/8403#comment:2 https://svn.boost.org/trac10/ticket/8403#comment:2 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Cosmetic</span> </li> </ul> <p> This is not a bug. This requires considerable rewriting and adding speciliazations. Postponed. </p> Ticket Barend Gehrels Sat, 06 Apr 2013 22:49:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8403#comment:3 https://svn.boost.org/trac10/ticket/8403#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 Barend Gehrels Sun, 07 Apr 2013 11:20:47 GMT <link>https://svn.boost.org/trac10/ticket/8403#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8403#comment:4</guid> <description> <p> After doubting about this one, and looking at other Boost.Libraries, it is indeed probably the best to use #pragma's here. Many libraries do the same for the same problem. </p> <p> Alternatives were rewriting (too much), or declaring local non-const variables to avoid this warning (I considered this as too much workaround for this message only, and this has a (though small) performance penalty) </p> <p> So pragmas are added yesterday. </p> </description> <category>Ticket</category> </item> <item> <author>Volker Schöch <vschoech@…></author> <pubDate>Thu, 16 Oct 2014 10:25:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8403#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8403#comment:5</guid> <description> <p> This is related to Ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/10666" title="#10666: Support Requests: VC++ 2013 compiler warning C4127: conditional expression is constant (closed: fixed)">#10666</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>