Opened 11 years ago

Closed 11 years ago

#6723 closed Bugs (fixed)

calling rand() without std:: qualifier after including <cstdlib>

Reported by: stephen.clamage@… Owned by: timblechmann
Milestone: To Be Determined Component: heap
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

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.

Change History (1)

comment:1 by timblechmann, 11 years ago

Resolution: fixed
Status: newclosed

thanks for reporting, fixed

Note: See TracTickets for help on using tickets.