Boost C++ Libraries: Ticket #7470: Functional `using namespace std` causing compilation error with icpc -std=c++0x https://svn.boost.org/trac10/ticket/7470 <p> The following two files, <code>boost/functional/hash/detail/float_functions.hpp</code> <code>boost/functional/hash/detail/hash_float.hpp</code> </p> <p> Contains <code>using namespace std</code>, which can cause problems when compiled with <code>icpc -std=c++11</code>. For example, </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/thread.hpp&gt;</span><span class="cp"></span> <span class="kt">int</span> <span class="nf">main</span> <span class="p">()</span> <span class="p">{}</span> </pre></div></div><p> which will use and instance <code>float_hash_value</code> in <code>boost/functional/hash/detail/hash_float.hpp</code> will emit an overload error about <code>fpclassify</code> is ambitious, as both <code>std::fpclassify</code> and <code>::fpclassify</code> are perfect match. (tested on Ubuntu 12.04 with icpc 13). This is due to the fact that intel compilers supply its own <code>math.h</code> header and use its own optimized math functions instead of system headers. Change the directive to <code>using std::fpclassify</code> solve the issue . </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7470 Trac 1.4.3 Marshall Clow Wed, 31 Oct 2012 17:14:45 GMT <link>https://svn.boost.org/trac10/ticket/7470#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7470#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81122" title="Narrower 'using'; Refs #7470">[81122]</a>) Narrower 'using'; Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7470" title="#7470: Bugs: Functional `using namespace std` causing compilation error with icpc ... (closed: fixed)">#7470</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Wed, 31 Oct 2012 19:00:11 GMT</pubDate> <title>owner, status, component, severity changed https://svn.boost.org/trac10/ticket/7470#comment:2 https://svn.boost.org/trac10/ticket/7470#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">No-Maintainer</span> to <span class="trac-author">Daniel James</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>component</strong> <span class="trac-field-old">functional</span> → <span class="trac-field-new">hash</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> That'll break any libraries which don't have std::fpclassify. It also won't work as it's only one of the two headers, and if the other one is changed it will break the mechanism for detecting which floating point functions are available. It was written that way for a reason. </p> Ticket Daniel James Wed, 31 Oct 2012 19:05:27 GMT <link>https://svn.boost.org/trac10/ticket/7470#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7470#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81124" title="Hash: Revert r81122. Refs #7470. I'll get back to this later, it ...">[81124]</a>) Hash: Revert <a class="changeset" href="https://svn.boost.org/trac10/changeset/81122" title="Narrower 'using'; Refs #7470">r81122</a>. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7470" title="#7470: Bugs: Functional `using namespace std` causing compilation error with icpc ... (closed: fixed)">#7470</a>. </p> <p> I'll get back to this later, it probably requires compiler specific changes. </p> </description> <category>Ticket</category> </item> <item> <author>Christian Godenschwager <christian.godenschwager@…></author> <pubDate>Mon, 17 Dec 2012 22:07:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7470#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7470#comment:4</guid> <description> <p> Any news on this one? A Boost 1.53.0 with icpc 13.0 &amp; C++11 support would be highly appreciated. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Mon, 17 Dec 2012 23:08:25 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7470#comment:5 https://svn.boost.org/trac10/ticket/7470#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This should have been fixed in trunk in <a class="changeset" href="https://svn.boost.org/trac10/changeset/81677" title="Hash: Don't use workarounds with recent compilers. #7221, #7470">r81677</a> and release in <a class="changeset" href="https://svn.boost.org/trac10/changeset/81920" title="Hash: Merge from trunk. - Avoid floating point workarounds on recent ...">r81920</a>. </p> Ticket