libstdc++: Fix constant expressions in std::uniform_int_distribution
authorJonathan Wakely <jwakely@redhat.com>
Wed, 4 Nov 2020 10:36:45 +0000 (10:36 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 4 Nov 2020 10:36:45 +0000 (10:36 +0000)
commit24366207b77481bceebb425569932297c441e04e
tree10d97d126082a07b63083e40d90b145e5b1d5e30
parent10a50d261e5504887b0702bea3876103ea461f2b
libstdc++: Fix constant expressions in std::uniform_int_distribution

Clang and EDG say the class member access expressions __urng.min() and
__urng.max() are not constant expressions, because the object expression
__urng is not usable in a constant expresion. Use a qualified-id to call
those static member functions instead.

Co-authored-by: Stephan Bergmann <sbergman@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
Use qualified-id to refer to static member functions.
libstdc++-v3/include/bits/uniform_int_dist.h