Opened 10 years ago
Closed 10 years ago
#7470 closed Bugs (fixed)
Functional `using namespace std` causing compilation error with icpc -std=c++0x
Reported by: | anonymous | Owned by: | Daniel James |
---|---|---|---|
Milestone: | To Be Determined | Component: | hash |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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,
#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 .
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Component: | functional → hash |
---|---|
Owner: | changed from | to
Severity: | Showstopper → Problem |
Status: | new → assigned |
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.
comment:3 by , 10 years ago
comment:4 by , 10 years ago
Any news on this one? A Boost 1.53.0 with icpc 13.0 & C++11 support would be highly appreciated.
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [81122]) Narrower 'using'; Refs #7470