Subject: [Boost-bugs] [Boost C++ Libraries] #7470: Functional `using namespace std` causing compilation error with icpc -std=c++0x
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-04 18:47:39
#7470: Functional `using namespace std` causing compilation error with icpc
-std=c++0x
------------------------------+---------------------------------------------
Reporter: anonymous | Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: functional
Version: Boost 1.52.0 | Severity: Showstopper
Keywords: |
------------------------------+---------------------------------------------
The following two files,
`boost/functional/hash/detail/float_functions.hpp`
`boost/functional/hash/detail/hash_float.hpp`
Contains `using namespace std`, which can cause problems when compiled
with `icpc -std=c++11`. For example,
{{{#!cpp
#include <boost/thread.hpp>
int main () {}
}}}
which will use and instance `float_hash_value` in
`boost/functional/hash/detail/hash_float.hpp` will emit an overload error
about `fpclassify` is ambitious, as both `std::fpclassify` and
`::fpclassify` are perfect match. (tested on Ubuntu 12.04 with icpc 13).
This is due to the fact that intel compilers supply its own `math.h`
header and use its own optimized math functions instead of system headers.
Change the directive to `using std::fpclassify` solve the issue .
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7470> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC