mirror of git://gcc.gnu.org/git/gcc.git
stl_algo.h (shuffle): Change signature consistently with random_shuffle (US 121).
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
This commit is contained in:
parent
4c7aaebf4d
commit
633e8e192b
|
@ -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>
|
2010-08-11 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* include/bits/move.h (forward): Reinstate the N2835 version.
|
* include/bits/move.h (forward): Reinstate the N2835 version.
|
||||||
|
|
|
@ -521,7 +521,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
|
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
|
||||||
template<typename _RAIter, typename _UGenerator>
|
template<typename _RAIter, typename _UGenerator>
|
||||||
void
|
void
|
||||||
shuffle(_RAIter, _RAIter, _UGenerator&);
|
shuffle(_RAIter, _RAIter, _UGenerator&&);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename _RAIter>
|
template<typename _RAIter>
|
||||||
|
|
|
@ -4133,7 +4133,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
typename _UniformRandomNumberGenerator>
|
typename _UniformRandomNumberGenerator>
|
||||||
void
|
void
|
||||||
shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
|
shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
|
||||||
_UniformRandomNumberGenerator& __g)
|
_UniformRandomNumberGenerator&& __g)
|
||||||
{
|
{
|
||||||
// concept requirements
|
// concept requirements
|
||||||
__glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
|
__glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
// with this library; see the file COPYING3. If not see
|
// with this library; see the file COPYING3. If not see
|
||||||
// <http://www.gnu.org/licenses/>.
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <testsuite_api.h>
|
#include <testsuite_api.h>
|
||||||
|
@ -34,5 +33,5 @@ namespace std
|
||||||
typedef value_type* iterator_type;
|
typedef value_type* iterator_type;
|
||||||
typedef std::mt19937_64 ugenerator_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&&);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,5 +33,5 @@ namespace std
|
||||||
typedef value_type* iterator_type;
|
typedef value_type* iterator_type;
|
||||||
typedef std::mt19937_64 ugenerator_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&&);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue