Opened 11 years ago
#6768 new Bugs
missing std:: qualifier on sqrt calls
Reported by: | Owned by: | Douglas Gregor | |
---|---|---|---|
Milestone: | To Be Determined | Component: | numeric |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | Cc: |
Description
File libs/numeric/ublas/test/test_complex_norms.cpp includes <cmath> and then calls sqrt twice without a std:: qualifier. Although the code works with some compilers, it is not portable. The C++ standard says that if you include a <cxxx> headaer (like <cmath>) the names in the headers are (only) in namespace std. Diffs to fix the file:
37c37 < const double expected = sqrt(44.0); --- > const double expected = std::sqrt(44.0); 65c65 < const float expected = sqrt(44.0); --- > const float expected = std::sqrt(44.0);
Note:
See TracTickets
for help on using tickets.