From: Ed Smith-Rowland <3dw4rd@verizon.net> Date: Mon, 8 Feb 2010 17:42:12 +0000 (+0000) Subject: random.tcc (uniform_int_distribution<>:: operator()(_UniformRandomNumberGenerator... X-Git-Tag: releases/gcc-4.5.0~862 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83c290e2d426bc1ee3ed4a91758738e0197cdff2;p=thirdparty%2Fgcc.git random.tcc (uniform_int_distribution<>:: operator()(_UniformRandomNumberGenerator&, const param_type&)): Use make_unsigned instead of __add_unsigned and conditional instead of... 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 and . From-SVN: r156608 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fe4f03914e67..4365a432a28a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +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 and + . + 2010-02-07 Paolo Carlini PR libstdc++/16896 diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index ee92240365af..080a1dad88d4 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::__type __urntype; - typedef typename __gnu_cxx::__add_unsigned::__type - __utype; - typedef typename __gnu_cxx::__conditional_type<(sizeof(__urntype) - > sizeof(__utype)), - __urntype, __utype>::__type __uctype; + typedef typename std::make_unsigned::type __urntype; + typedef typename std::make_unsigned::type __utype; + typedef typename std::conditional<(sizeof(__urntype) > sizeof(__utype)), + __urntype, __utype>::type __uctype; result_type __ret; diff --git a/libstdc++-v3/include/std/random b/libstdc++-v3/include/std/random index 72d3ceb7f431..c1c7cdfda456 100644 --- a/libstdc++-v3/include/std/random +++ b/libstdc++-v3/include/std/random @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -41,8 +41,6 @@ #include #include #include -#include -#include #include #include