OSDN Git Service

2012-04-14 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Apr 2012 02:14:39 +0000 (02:14 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Apr 2012 02:14:39 +0000 (02:14 +0000)
commit5f9f2aa45d0797d50e54dc3b172f1241a563448a
treeb6f061ba12eebcef3eda3bf2844a74c7dc44c441
parent23bb9e6f68ab10679b1793c20c7cb1cb7acd54e9
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/branches/gcc-4_7-branch@186461 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.tcc
libstdc++-v3/include/bits/stl_algobase.h