summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/random.tcc
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-08 17:42:12 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-08 17:42:12 +0000
commit113bf78bc97a4effe454873eb6784ce5f34b98cb (patch)
tree0a01259d2ec5d6e05a673e332f5e5a5912810a14 /libstdc++-v3/include/bits/random.tcc
parentd1c95ff78f7222d26d6fc2055e75a0ab79a7c8cd (diff)
downloadgcc-113bf78bc97a4effe454873eb6784ce5f34b98cb.tar.gz
2010-02-08 Ed Smith-Rowland <3dw4rd@verizon.net>
* include/bits/random.tcc (uniform_int_distribution<>:: operator()(_UniformRandomNumberGenerator&, const param_type&)): Use make_unsigned instead of __add_unsigned and conditional instead of __conditional_type. * include/std/random: Do not include <ext/type_traits.h> and <ext/numeric_traits.h>. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156608 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/random.tcc')
-rw-r--r--libstdc++-v3/include/bits/random.tcc12
1 files changed, 5 insertions, 7 deletions
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index ee92240365a..080a1dad88d 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -822,13 +822,11 @@ namespace std
// __urng.min(), __param.b(), __param.a(). Currently works fine only
// in the most common case __urng.max() - __urng.min() >=
// __param.b() - __param.a(), with __urng.max() > __urng.min() >= 0.
- typedef typename __gnu_cxx::__add_unsigned<typename
- _UniformRandomNumberGenerator::result_type>::__type __urntype;
- typedef typename __gnu_cxx::__add_unsigned<result_type>::__type
- __utype;
- typedef typename __gnu_cxx::__conditional_type<(sizeof(__urntype)
- > sizeof(__utype)),
- __urntype, __utype>::__type __uctype;
+ typedef typename std::make_unsigned<typename
+ _UniformRandomNumberGenerator::result_type>::type __urntype;
+ typedef typename std::make_unsigned<result_type>::type __utype;
+ typedef typename std::conditional<(sizeof(__urntype) > sizeof(__utype)),
+ __urntype, __utype>::type __uctype;
result_type __ret;