OSDN Git Service

2010-02-08 Ed Smith-Rowland <3dw4rd@verizon.net>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Feb 2010 17:42:12 +0000 (17:42 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Feb 2010 17:42:12 +0000 (17:42 +0000)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.tcc
libstdc++-v3/include/std/random

index fe4f039..4365a43 100644 (file)
@@ -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 <ext/type_traits.h> and
+       <ext/numeric_traits.h>.
+
 2010-02-07  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR libstdc++/16896
index ee92240..080a1da 100644 (file)
@@ -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;
 
index 72d3ceb..c1c7cdf 100644 (file)
@@ -1,6 +1,6 @@
 // <random> -*- 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 <string>
 #include <iosfwd>
 #include <limits>
-#include <ext/type_traits.h>
-#include <ext/numeric_traits.h>
 #include <debug/debug.h>
 #include <type_traits>