2012-04-14 Paolo Carlini <paolo.carlini@oracle.com>
commit672db419dcc273bda621c67bfc4ea15020d9b715
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 14 Apr 2012 22:33:22 +0000 (14 22:33 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 14 Apr 2012 22:33:22 +0000 (14 22:33 +0000)
tree8b420cece30584d28c1e8bb54f8329b5dfb328c3
parent04d95c72efb8dc3229239efbde5f68e7be7b7725
2012-04-14  Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/52699
* include/bits/random.tcc (independent_bits_engine<>::operator()())
Avoid various overflows; use common_type on result_type and
_RandomNumberEngine::result_type; avoid floating point computations;
other smaller tweaks.

* include/bits/random.tcc (uniform_int_distribution<>::operator())
Use common_type; assume _UniformRandomNumberGenerator::result_type
unsigned; tidy.

* include/bits/stl_algobase.h (__lg(unsigned), __lg(unsigned long),
__lg(unsigned long long)): Add.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186456 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.tcc
libstdc++-v3/include/bits/stl_algobase.h