Subject: [Boost-bugs] [Boost C++ Libraries] #6723: calling rand() without std:: qualifier after including <cstdlib>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-21 16:01:18
#6723: calling rand() without std:: qualifier after including <cstdlib>
----------------------------------------+-----------------------------------
Reporter: stephen.clamage@⦠| Owner: timblechmann
Type: Bugs | Status: new
Milestone: To Be Determined | Component: heap
Version: Boost 1.49.0 | Severity: Problem
Keywords: |
----------------------------------------+-----------------------------------
File libs/heap/test/mutable_heap_tests.hpp includes `<cstdlib>` but on
line 235 makes a call to rand() without the `std::` qualifier.
Although the code compiles using gcc, a standard-conforming compiler will
not find `rand()` in the global namespace, and the compilation will fail
(and does fail using some popular compilers).
The call should be qualified as `std::rand()` to allow the code to compile
with all compilers.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6723> 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