diff mbox

[v3] Resolve US 121

Message ID 4C62D9D7.7050200@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Aug. 11, 2010, 5:11 p.m. UTC
Hi,

as agreed in Rapperswil. Tested x86_64-linux, committed.

Paolo.

/////////////////////////
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.
diff mbox

Patch

Index: include/bits/stl_algo.h
===================================================================
--- include/bits/stl_algo.h	(revision 163100)
+++ include/bits/stl_algo.h	(working copy)
@@ -4133,7 +4133,7 @@ 
 	   typename _UniformRandomNumberGenerator>
     void
     shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
-	    _UniformRandomNumberGenerator& __g)
+	    _UniformRandomNumberGenerator&& __g)
     {
       // concept requirements
       __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
Index: include/bits/algorithmfwd.h
===================================================================
--- include/bits/algorithmfwd.h	(revision 163100)
+++ include/bits/algorithmfwd.h	(working copy)
@@ -521,7 +521,7 @@ 
 #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: testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc
===================================================================
--- testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc	(revision 163100)
+++ testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc	(working copy)
@@ -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 @@ 
   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: testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc
===================================================================
--- testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc	(revision 163100)
+++ testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc	(working copy)
@@ -33,5 +33,5 @@ 
   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&&);
 }