summaryrefslogtreecommitdiffstats
path: root/libcxx/include/algorithm
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-06-21 15:20:55 +0000
committerEric Fiselier <eric@efcs.ca>2019-06-21 15:20:55 +0000
commit000f25a37e76317aa78b0f6dd9283ba41af94591 (patch)
tree988a2d163afe5459926808aaa05139cc86ec7e61 /libcxx/include/algorithm
parentddb9093684062b6552b338ff754c674e79a55826 (diff)
downloadbcm5719-llvm-000f25a37e76317aa78b0f6dd9283ba41af94591.tar.gz
bcm5719-llvm-000f25a37e76317aa78b0f6dd9283ba41af94591.zip
Make move and forward work in C++03.
These functions are key to allowing the use of rvalues and variadics in C++03 mode. Everything works the same as in C++11, except for one tangentially related case: struct T { T(T &&) = default; }; In C++11, T has a deleted copy constructor. But in C++03 Clang gives it both a move and a copy constructor. This seems reasonable enough given the extensions it's using. The other changes in this patch were the minimal set required to keep the tests passing after the move/forward change. Most notably the removal of the `__rv<unique_ptr>` hack that was present in an attempt to make unique_ptr move only without language support. llvm-svn: 364063
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r--libcxx/include/algorithm4
1 files changed, 0 insertions, 4 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 326e566fbf7..d17666a2955 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -3181,11 +3181,7 @@ _SampleIterator sample(_PopulationIterator __first,
template<class _RandomAccessIterator, class _UniformRandomNumberGenerator>
void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
-#ifndef _LIBCPP_CXX03_LANG
_UniformRandomNumberGenerator&& __g)
-#else
- _UniformRandomNumberGenerator& __g)
-#endif
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef uniform_int_distribution<ptrdiff_t> _Dp;
OpenPOWER on IntegriCloud