Opened 5 years ago

Closed 5 years ago

#7470 closed Bugs (fixed)

Functional `using namespace std` causing compilation error with icpc -std=c++0x

Reported by: anonymous Owned by: danieljames
Milestone: To Be Determined Component: hash
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:


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 .

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by marshall

(In [81122]) Narrower 'using'; Refs #7470

comment:2 Changed 5 years ago by danieljames

  • Component changed from functional to hash
  • Owner changed from no-maintainer to danieljames
  • Severity changed from Showstopper to Problem
  • Status changed from new to 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 Changed 5 years ago by danieljames

(In [81124]) Hash: Revert r81122. Refs #7470.

I'll get back to this later, it probably requires compiler specific changes.

comment:4 Changed 5 years ago by Christian Godenschwager <christian.godenschwager@…>

Any news on this one? A Boost 1.53.0 with icpc 13.0 & C++11 support would be highly appreciated.

comment:5 Changed 5 years ago by danieljames

  • Resolution set to fixed
  • Status changed from assigned to closed

This should have been fixed in trunk in r81677 and release in r81920.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain danieljames.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.