Remove random_shuffle in C++17. Please use shuffle instead. If you have to, you cant get it back by defining _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE before including any libc++ headers.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2017-03-23 13:43:37 +00:00
parent 46da6b8295
commit 03b862f6ea
4 changed files with 52 additions and 2 deletions

View File

@@ -281,12 +281,12 @@ template <class ForwardIterator, class OutputIterator>
template <class RandomAccessIterator>
void
random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14
random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14, removed in C++17
template <class RandomAccessIterator, class RandomNumberGenerator>
void
random_shuffle(RandomAccessIterator first, RandomAccessIterator last,
RandomNumberGenerator& rand); // deprecated in C++14
RandomNumberGenerator& rand); // deprecated in C++14, removed in C++17
template<class PopulationIterator, class SampleIterator,
class Distance, class UniformRandomBitGenerator>
@@ -3026,6 +3026,7 @@ uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p
return static_cast<result_type>(__u + __p.a());
}
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE)
class _LIBCPP_TYPE_VIS __rs_default;
_LIBCPP_FUNC_VIS __rs_default __rs_get();
@@ -3095,6 +3096,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
}
}
}
#endif
template <class _PopulationIterator, class _SampleIterator, class _Distance,
class _UniformRandomNumberGenerator>