http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48125
Summary: max() and min() member functions of random number
engines should be static
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: [email protected]
ReportedBy: [email protected]
Table 113 in 26.5.1.3 says that expressions G::min() and G::max() should have
the result type of the class G satisfying the requirements of a uniform random
number generator. The specific engines in 26.5.3 (linear_congruential,
mersenne_twister, etc.) are required to have static constexpr min() and max()
members.
In include/c++/4.5.2/bits/random.h, the min() and max() member functions are
all non-static. I think the fix is simply to add the static keyword and remove
the const qualifier from all of them.