[Boost-bugs] [Boost C++ Libraries] #10913: Missing std:: qualifier for pow call in units/test/test_output.cpp

Subject: [Boost-bugs] [Boost C++ Libraries] #10913: Missing std:: qualifier for pow call in units/test/test_output.cpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-06 19:05:56


#10913: Missing std:: qualifier for pow call in units/test/test_output.cpp
-------------------------------------------+-----------------------------
 Reporter: Aparna Kumta <aparna.kumta@…> | Owner: matthiasschabel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: units
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------------+-----------------------------
 Compiling test_output.cpp with Oracle Solaris Studio 12.4 compiler on
 Solaris 11.2 with -library=stlport4, we see

 "../libs/units/test/test_output.cpp", line 262: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 262: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 356: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 356: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 404: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 404: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 413: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 413: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 414: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 414: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 415: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 415: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 416: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 416: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 417: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 417: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 418: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 418: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 419: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 419: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 437: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 437: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 438: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 438: Error: The function "pow"
 must have a prototype.
 "../libs/units/test/test_output.cpp", line 439: Error: The function "pow"
 must have a prototype.

 The call to pow is unqualified and the following change resolves the
 issue.
 % diff ./test_output.cpp ./test_output.cpp_orig
 262c262
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 10) *
 byte_base_unit::unit_type(), "1024 b");
 ---
> BOOST_UNITS_TEST_OUTPUT(pow(2., 10) * byte_base_unit::unit_type(),
 "1024 b");
 356c356
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 10) *
 byte_base_unit::unit_type(), "1.024 kilobyte");
 ---
> BOOST_UNITS_TEST_OUTPUT(pow(2., 10) * byte_base_unit::unit_type(),
 "1.024 kilobyte");
 404c404
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 10) *
 byte_base_unit::unit_type(), "1.024 kb");
 ---
> BOOST_UNITS_TEST_OUTPUT(pow(2., 10) * byte_base_unit::unit_type(),
 "1.024 kb");
 413,419c413,419
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 20) *
 byte_base_unit::unit_type(), "1 Mib");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 30) *
 byte_base_unit::unit_type(), "1 Gib");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 40) *
 byte_base_unit::unit_type(), "1 Tib");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 50) *
 byte_base_unit::unit_type(), "1 Pib");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 60) *
 byte_base_unit::unit_type(), "1 Eib");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 70) *
 byte_base_unit::unit_type(), "1 Zib");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 80) *
 byte_base_unit::unit_type(), "1 Yib");
 ---
> BOOST_UNITS_TEST_OUTPUT(pow(2., 20) * byte_base_unit::unit_type(),
 "1 Mib");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 30) * byte_base_unit::unit_type(),
 "1 Gib");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 40) * byte_base_unit::unit_type(),
 "1 Tib");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 50) * byte_base_unit::unit_type(),
 "1 Pib");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 60) * byte_base_unit::unit_type(),
 "1 Eib");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 70) * byte_base_unit::unit_type(),
 "1 Zib");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 80) * byte_base_unit::unit_type(),
 "1 Yib");
 437,442c437,442
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 32)
 *byte_base_unit::unit_type(), "4 gibibyte");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 41)
 *byte_base_unit::unit_type(), "2 tebibyte"); //
 http://en.wikipedia.org/wiki/Tebibyte
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 50)
 *byte_base_unit::unit_type(), "1 pebibyte");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 60)
 *byte_base_unit::unit_type(), "1 exbibyte");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 70)
 *byte_base_unit::unit_type(), "1 zebibyte");
 < BOOST_UNITS_TEST_OUTPUT(std::pow(2., 80)
 *byte_base_unit::unit_type(), "1 yobibyte");
 ---
> BOOST_UNITS_TEST_OUTPUT(pow(2., 32) *byte_base_unit::unit_type(), "4
 gibibyte");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 41) *byte_base_unit::unit_type(), "2
 tebibyte"); // http://en.wikipedia.org/wiki/Tebibyte
> BOOST_UNITS_TEST_OUTPUT(pow(2., 50) *byte_base_unit::unit_type(), "1
 pebibyte");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 60) *byte_base_unit::unit_type(), "1
 exbibyte");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 70) *byte_base_unit::unit_type(), "1
 zebibyte");
> BOOST_UNITS_TEST_OUTPUT(pow(2., 80) *byte_base_unit::unit_type(), "1
 yobibyte");

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10913>
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:17 UTC