[Boost-bugs] [Boost C++ Libraries] #10986: Missing std:: qualifier for rand in test_triangular.cpp

Subject: [Boost-bugs] [Boost C++ Libraries] #10986: Missing std:: qualifier for rand in test_triangular.cpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-30 21:44:59


#10986: Missing std:: qualifier for rand in test_triangular.cpp
-------------------------------------------+---------------------
 Reporter: Aparna Kumta <aparna.kumta@…> | Owner: guwi17
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: uBLAS
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------------+---------------------
 Compiling libs/numeric/ublas/test/test_triangular.cpp on Solaris 11.2 with
 Oracle Solaris Studio12.4 compiler with -library=stlport4, we see

 "../libs/numeric/ublas/test/test_triangular.cpp", line 49: Error: The
 function "rand" must have a prototype.

 "../libs/numeric/ublas/test/test_triangular.cpp", line 51: Error: The
 function "rand" must have a prototype.

 "../libs/numeric/ublas/test/test_triangular.cpp", line 48: Error: The
 function "rand" must have a prototype.

 3 Error(s) detected.

 The rand() function needs to be qualified with std::.

 diff ./test_triangular.cpp ./test_triangular.cpp_orig

 3,5d2
 < #include <cstdlib>

 <
 <
 51,52c48,49
 < b(i) = std::rand() % 10;
 < double main = -10 + std::rand() % 20 ;
 ---
> b(i) = rand() % 10;
> double main = -10 + rand() % 20 ;
 54c51
 < double side = -10 + std::rand() % 20 ;
 ---
> double side = -10 + rand() % 20 ;

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