[Boost-bugs] [Boost C++ Libraries] #6768: missing std:: qualifier on sqrt calls

Subject: [Boost-bugs] [Boost C++ Libraries] #6768: missing std:: qualifier on sqrt calls
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-04-05 20:05:04


#6768: missing std:: qualifier on sqrt calls
----------------------------------------------------------+-----------------
 Reporter: Stephen Clamage <stephen.clamage@…> | Owner: dgregor
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: numeric
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: |
----------------------------------------------------------+-----------------
 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);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6768>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC