]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stl_algo.h (shuffle): Change signature consistently with random_shuffle (US 121).
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 11 Aug 2010 17:10:04 +0000 (17:10 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 11 Aug 2010 17:10:04 +0000 (17:10 +0000)
2010-08-11  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/stl_algo.h (shuffle): Change signature consistently
with random_shuffle (US 121).
* include/bits/algorithmfwd.h: Adjust.
* testsuite/25_algorithms/shuffle/requirements/
explicit_instantiation/2.cc: Likewise.
* testsuite/25_algorithms/shuffle/requirements/
explicit_instantiation/pod.cc: Likewise.

From-SVN: r163102

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/algorithmfwd.h
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc
libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc

index c0649d7a43c15bd5606f620e4640901940ddd295..841523f9021f36681f82a7196198eef08b170e46 100644 (file)
@@ -1,3 +1,13 @@
+2010-08-11  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/stl_algo.h (shuffle): Change signature consistently
+       with random_shuffle (US 121).
+       * include/bits/algorithmfwd.h: Adjust.
+       * testsuite/25_algorithms/shuffle/requirements/
+       explicit_instantiation/2.cc: Likewise.
+       * testsuite/25_algorithms/shuffle/requirements/
+       explicit_instantiation/pod.cc: Likewise.
+
 2010-08-11  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/bits/move.h (forward): Reinstate the N2835 version.
index cbd7f6fe20e4eae874556cf7b544478e09131f71..cf541bc28aa3895cc5e1e4c3e386dae0768febb4 100644 (file)
@@ -521,7 +521,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 #if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
   template<typename _RAIter, typename _UGenerator>
     void
-    shuffle(_RAIter, _RAIter, _UGenerator&);
+    shuffle(_RAIter, _RAIter, _UGenerator&&);
 #endif
 
   template<typename _RAIter>
index fe2edb9c8da74cc506d2c23bb3aea9159da29c33..eecfd24d598c7f599f78624ab2ef6b91d82f97c3 100644 (file)
@@ -4133,7 +4133,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
           typename _UniformRandomNumberGenerator>
     void
     shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
-           _UniformRandomNumberGenerator& __g)
+           _UniformRandomNumberGenerator&& __g)
     {
       // concept requirements
       __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
index 6941bd08779780fc48fa6c1d0cb80e59b63ca099..840310248232c0c3aba0a631ca6e53127b8085d7 100644 (file)
@@ -21,7 +21,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
 #include <algorithm>
 #include <random>
 #include <testsuite_api.h>
@@ -34,5 +33,5 @@ namespace std
   typedef value_type*                 iterator_type;
   typedef std::mt19937_64            ugenerator_type;
 
-  template void shuffle(iterator_type, iterator_type, ugenerator_type&);
+  template void shuffle(iterator_type, iterator_type, ugenerator_type&&);
 } 
index a33ddd46bf93d780639eb2ae35248d94ac762cd0..0f0a1e19ea4c31a8b324140e344efe6470a996cc 100644 (file)
@@ -33,5 +33,5 @@ namespace std
   typedef value_type*                 iterator_type;
   typedef std::mt19937_64            ugenerator_type;
 
-  template void shuffle(iterator_type, iterator_type, ugenerator_type&);
+  template void shuffle(iterator_type, iterator_type, ugenerator_type&&);
 }