diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c0649d7a43c..841523f9021 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2010-08-11 Paolo Carlini + + * 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 * include/bits/move.h (forward): Reinstate the N2835 version. diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index cbd7f6fe20e..cf541bc28aa 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -521,7 +521,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1) template void - shuffle(_RAIter, _RAIter, _UGenerator&); + shuffle(_RAIter, _RAIter, _UGenerator&&); #endif template diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index fe2edb9c8da..eecfd24d598 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -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< diff --git a/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc index 6941bd08779..84031024823 100644 --- a/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/2.cc @@ -21,7 +21,6 @@ // with this library; see the file COPYING3. If not see // . - #include #include #include @@ -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&&); } diff --git a/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc index a33ddd46bf9..0f0a1e19ea4 100644 --- a/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc +++ b/libstdc++-v3/testsuite/25_algorithms/shuffle/requirements/explicit_instantiation/pod.cc @@ -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&&); }