Modify

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: 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 .

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by Marshall Clow

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

comment:2 Changed 5 years ago by Daniel James

Component: functionalhash
Owner: changed from No-Maintainer to Daniel James
Severity: ShowstopperProblem
Status: newassigned

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 Daniel James

(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 Daniel James

Resolution: fixed
Status: assignedclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Daniel James.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.