Modify

Ticket #7470 (closed Bugs: fixed)

Opened 19 months ago

Last modified 16 months ago

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:

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

Change History

comment:1 Changed 18 months ago by marshall

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

comment:2 Changed 18 months ago by danieljames

  • Owner changed from no-maintainer to danieljames
  • Status changed from new to assigned
  • Component changed from functional to hash
  • Severity changed from Showstopper to Problem

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 18 months 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 16 months 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 16 months ago by danieljames

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

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.