diff --git a/include/__config b/include/__config index 9511ee1b8..a5a2d1f0e 100644 --- a/include/__config +++ b/include/__config @@ -86,6 +86,10 @@ #if defined(__clang__) +#define _LIBCPP_HAS_NO_ADVANCED_SFINAE +#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES +#define _LIBCPP_HAS_NO_UNICODE_CHARS + #if !(__has_feature(cxx_exceptions)) #define _LIBCPP_NO_EXCEPTIONS #endif @@ -94,8 +98,42 @@ #define _LIBCPP_NO_RTTI #endif -#define _LIBCPP_HAS_NO_ADVANCED_SFINAE -#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES +#if !(__has_feature(cxx_decltype)) +#define _LIBCPP_HAS_NO_DECLTYPE +#endif + +#if !(__has_feature(cxx_attributes)) +#define _LIBCPP_HAS_NO_ATTRIBUTES +#endif + +#if !(__has_feature(cxx_deleted_functions)) +#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS +#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#endif // !(__has_feature(cxx_deleted_functions)) + +#if !(__has_feature(cxx_lambdas)) +#define _LIBCPP_HAS_NO_LAMBDAS +#endif + +#if !(__has_feature(cxx_nullptr)) +#define _LIBCPP_HAS_NO_NULLPTR +#endif + +#if !(__has_feature(cxx_rvalue_references)) +#define _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif + +#if !(__has_feature(cxx_static_assert)) +#define _LIBCPP_HAS_NO_STATIC_ASSERT +#endif + +#if !(__has_feature(cxx_auto_type)) +#define _LIBCPP_HAS_NO_AUTO_TYPE +#endif + +#if !(__has_feature(cxx_variadic_templates)) +#define _LIBCPP_HAS_NO_VARIADICS +#endif #if __has_feature(cxx_inline_namespaces) #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { @@ -107,50 +145,14 @@ inline namespace _LIBCPP_NAMESPACE { } using namespace _LIBCPP_NAMESPACE; } + #else // __has_feature(cxx_inline_namespaces) #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { #define _LIBCPP_END_NAMESPACE_STD } #define _STD std #endif // __has_feature(cxx_inline_namespaces) -#ifndef __GXX_EXPERIMENTAL_CXX0X__ - -#define _LIBCPP_HAS_NO_DECLTYPE -#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS -#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS -#define _LIBCPP_HAS_NO_NULLPTR -#define _LIBCPP_HAS_NO_STATIC_ASSERT -#define _LIBCPP_HAS_NO_UNICODE_CHARS -#define _LIBCPP_HAS_NO_VARIADICS - -#else // __GXX_EXPERIMENTAL_CXX0X__ - -#if __has_feature(cxx_rvalue_references) -#define _LIBCPP_MOVE -#endif - -#if !(__has_feature(cxx_decltype)) -#define _LIBCPP_HAS_NO_DECLTYPE -#endif - -#if !(__has_feature(cxx_deleted_functions)) -#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS -#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS -#endif // !(__has_feature(cxx_deleted_functions)) - -#if !(__has_feature(cxx_nullptr)) -#define _LIBCPP_HAS_NO_NULLPTR -#endif - -#if !(__has_feature(cxx_static_assert)) -#define _LIBCPP_HAS_NO_STATIC_ASSERT -#endif - -#if !(__has_feature(cxx_variadic_templates)) -#define _LIBCPP_HAS_NO_VARIADICS -#endif - -#endif // __GXX_EXPERIMENTAL_CXX0X__ +// end defined(__clang__) #elif defined(__GNUC__) @@ -170,11 +172,12 @@ using namespace _LIBCPP_NAMESPACE; #define _LIBCPP_HAS_NO_STATIC_ASSERT #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS +#define _LIBCPP_HAS_NO_RVALUE_REFERENCES #else // __GXX_EXPERIMENTAL_CXX0X__ -#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 -#define _LIBCPP_MOVE +#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) +#define _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) diff --git a/include/__functional_base b/include/__functional_base index 2746867c8..769979ef3 100644 --- a/include/__functional_base +++ b/include/__functional_base @@ -457,7 +457,7 @@ private: public: // construct/copy/destroy _LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) : __f_(&__f) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES private: reference_wrapper(type&&); public: // = delete; // do not bind to temps #endif @@ -511,10 +511,20 @@ cref(reference_wrapper<_Tp> __t) return cref(__t.get()); } -#ifdef _LIBCPP_MOVE -template void ref(const _Tp&& __t);// = delete; // LWG 688 -template void cref(const _Tp&& __t);// = delete; // LWG 688 -#endif // _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS + +template void ref(const _Tp&& __t) = delete; +template void cref(const _Tp&& __t) = delete; + +#else // _LIBCPP_HAS_NO_DELETED_FUNCTIONS + +template void ref(const _Tp&& __t);// = delete; +template void cref(const _Tp&& __t);// = delete; + +#endif // _LIBCPP_HAS_NO_DELETED_FUNCTIONS + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif // _LIBCPP_HAS_NO_VARIADICS diff --git a/include/__hash_table b/include/__hash_table index 877310052..95ecd3496 100644 --- a/include/__hash_table +++ b/include/__hash_table @@ -346,7 +346,7 @@ public: __bucket_list_deallocator(const allocator_type& __a, size_type __size) : __data_(__size, __a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __bucket_list_deallocator(__bucket_list_deallocator&& __x) : __data_(_STD::move(__x.__data_)) @@ -354,7 +354,7 @@ public: __x.size() = 0; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES size_type& size() {return __data_.first();} size_type size() const {return __data_.first();} @@ -486,14 +486,14 @@ public: explicit __hash_table(const allocator_type& __a); __hash_table(const __hash_table& __u); __hash_table(const __hash_table& __u, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __hash_table(__hash_table&& __u); __hash_table(__hash_table&& __u, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~__hash_table(); __hash_table& operator=(const __hash_table& __u); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __hash_table& operator=(__hash_table&& __u); #endif template @@ -512,31 +512,31 @@ public: iterator __node_insert_multi(const_iterator __p, __node_pointer __nd); -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template pair __emplace_unique(_Args&&... __args); template iterator __emplace_multi(_Args&&... __args); template iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args); -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) pair __insert_unique(const value_type& __x); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template pair __insert_unique(_P&& __x); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template iterator __insert_multi(_P&& __x); template iterator __insert_multi(const_iterator __p, _P&& __x); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator __insert_multi(const value_type& __x); iterator __insert_multi(const_iterator __p, const value_type& __x); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void clear(); void rehash(size_type __n); @@ -615,11 +615,13 @@ public: private: void __rehash(size_type __n); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template __node_holder __construct_node(_Args&& ...__args); +#endif __node_holder __construct_node(value_type&& __v, size_t __hash); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES __node_holder __construct_node(const value_type& __v); #endif __node_holder __construct_node(const value_type& __v, size_t __hash); @@ -734,7 +736,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u, { } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u) @@ -777,7 +779,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u, } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template __hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() @@ -842,7 +844,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach() return __cache; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -926,7 +928,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -1245,7 +1247,8 @@ __done: return pair(iterator(__nd), __inserted); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template template @@ -1282,6 +1285,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi( return __r; } +#endif // _LIBCPP_HAS_NO_VARIADICS + template template pair::iterator, bool> @@ -1294,9 +1299,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_unique(_P&& __x) return __r; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -1321,7 +1326,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p, return __r; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator @@ -1344,7 +1349,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p, return __r; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1468,7 +1473,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const return end(); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template template @@ -1484,6 +1490,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args) return __h; } +#endif // _LIBCPP_HAS_NO_VARIADICS + template typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v, @@ -1498,7 +1506,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v, return _STD::move(__h); } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder @@ -1513,7 +1521,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v return _STD::move(__h); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder diff --git a/include/__mutex_base b/include/__mutex_base index bcfce1639..515029bf2 100644 --- a/include/__mutex_base +++ b/include/__mutex_base @@ -115,7 +115,7 @@ private: unique_lock& operator=(unique_lock const&); // = delete; public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unique_lock(unique_lock&& __u) : __m_(__u.__m_), __owns_(__u.__owns_) {__u.__m_ = nullptr; __u.__owns_ = false;} @@ -129,7 +129,7 @@ public: __u.__owns_ = false; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void lock(); bool try_lock(); diff --git a/include/__split_buffer b/include/__split_buffer index 1a488370d..a44c23197 100644 --- a/include/__split_buffer +++ b/include/__split_buffer @@ -58,11 +58,11 @@ public: __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a); ~__split_buffer(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __split_buffer(__split_buffer&& __c); __split_buffer(__split_buffer&& __c, const __alloc_rr& __a); __split_buffer& operator=(__split_buffer&& __c); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY iterator begin() {return __begin_;} _LIBCPP_INLINE_VISIBILITY const_iterator begin() const {return __begin_;} @@ -85,12 +85,12 @@ public: void shrink_to_fit(); void push_front(const_reference __x); void push_back(const_reference __x); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void push_front(value_type&& __x); void push_back(value_type&& __x); template void emplace_back(_Args&&... __args); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);} _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);} @@ -367,7 +367,7 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer() __alloc_traits::deallocate(__alloc(), __first_, capacity()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c) @@ -425,7 +425,7 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -510,7 +510,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x) --__begin_; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -542,7 +542,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) --__begin_; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template _LIBCPP_INLINE_VISIBILITY inline @@ -574,7 +574,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x) ++__end_; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -606,6 +606,8 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x) ++__end_; } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template void @@ -637,7 +639,9 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args) ++__end_; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_END_NAMESPACE_STD diff --git a/include/__tree b/include/__tree index 7def15492..10b5f3e51 100644 --- a/include/__tree +++ b/include/__tree @@ -589,14 +589,14 @@ public: value_type __value_; -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template explicit __tree_node(_Args&& ...__args) : __value_(_STD::forward<_Args>(__args)...) {} -#else // _LIBCPP_MOVE +#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) explicit __tree_node(const value_type& __v) : __value_(__v) {} -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) }; template class __map_iterator; @@ -827,11 +827,11 @@ public: void __assign_unique(_InputIterator __first, _InputIterator __last); template void __assign_multi(_InputIterator __first, _InputIterator __last); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __tree(__tree&& __t); __tree(__tree&& __t, const allocator_type& __a); __tree& operator=(__tree&& __t); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~__tree(); @@ -846,7 +846,8 @@ public: void swap(__tree& __t); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template pair __emplace_unique(_Args&&... __args); @@ -860,6 +861,7 @@ public: template iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args); +#endif // _LIBCPP_HAS_NO_VARIADICS template pair __insert_unique(_V&& __v); @@ -869,13 +871,13 @@ public: iterator __insert_multi(_V&& __v); template iterator __insert_multi(const_iterator __p, _V&& __v); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES pair __insert_unique(const value_type& __v); iterator __insert_unique(const_iterator __p, const value_type& __v); iterator __insert_multi(const value_type& __v); iterator __insert_multi(const_iterator __p, const value_type& __v); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES pair __node_insert_unique(__node_pointer __nd); iterator __node_insert_unique(const_iterator __p, @@ -967,10 +969,10 @@ private: __find_equal(const_iterator __hint, typename __node::base::pointer& __parent, const _Key& __v); -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template __node_holder __construct_node(_Args&& ...__args); -#else // _LIBCPP_MOVE +#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) __node_holder __construct_node(const value_type& __v); #endif @@ -1182,7 +1184,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t) __begin_node() = __end_node(); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) @@ -1302,7 +1304,7 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template __tree<_Tp, _Compare, _Allocator>::~__tree() @@ -1591,7 +1593,8 @@ __tree<_Tp, _Compare, _Allocator>::__insert_node_at(__node_base_pointer __parent ++size(); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template template @@ -1666,6 +1669,8 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p, return iterator(static_cast<__node_pointer>(__h.release())); } +#endif // _LIBCPP_HAS_NO_VARIADICS + template template pair::iterator, bool> @@ -1726,7 +1731,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, _V&& __v) return iterator(__h.release()); } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename __tree<_Tp, _Compare, _Allocator>::__node_holder @@ -1795,7 +1800,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const valu return iterator(__h.release()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template pair::iterator, bool> diff --git a/include/algorithm b/include/algorithm index 56426e773..74feafd4c 100644 --- a/include/algorithm +++ b/include/algorithm @@ -2693,7 +2693,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) template void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _RandomNumberGenerator&& __rand) #else _RandomNumberGenerator& __rand) diff --git a/include/deque b/include/deque index ac76f2aa4..94844cbd5 100644 --- a/include/deque +++ b/include/deque @@ -930,12 +930,12 @@ protected: explicit __deque_base(const allocator_type& __a); ~__deque_base(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __deque_base(__deque_base&& __c); __deque_base(__deque_base&& __c, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(__deque_base& __c); void clear(); @@ -1059,7 +1059,7 @@ __deque_base<_Tp, _Allocator>::~__deque_base() __alloc_traits::deallocate(__alloc(), *__i, __block_size); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c) @@ -1090,7 +1090,7 @@ __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_ } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1171,11 +1171,11 @@ public: deque& operator=(const deque& __c); deque& operator=(initializer_list __il) {assign(__il); return *this;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES deque(deque&& __c); deque(deque&& __c, const allocator_type& __a); deque& operator=(deque&& __c); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void assign(_InputIter __f, _InputIter __l, @@ -1227,14 +1227,16 @@ public: // 23.2.2.3 modifiers: void push_front(const value_type& __v); void push_back(const value_type& __v); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template void emplace_front(_Args&&... __args); template void emplace_back(_Args&&... __args); template iterator emplace(const_iterator __p, _Args&&... __args); +#endif // _LIBCPP_HAS_NO_VARIADICS void push_front(value_type&& __v); void push_back(value_type&& __v); iterator insert(const_iterator __p, value_type&& __v); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __p, const value_type& __v); iterator insert(const_iterator __p, size_type __n, const value_type& __v); template @@ -1396,7 +1398,7 @@ deque<_Tp, _Allocator>::operator=(const deque& __c) return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -1449,7 +1451,7 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type) __base::__move_assign(__c); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -1645,7 +1647,7 @@ deque<_Tp, _Allocator>::push_back(const value_type& __v) ++__base::size(); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1659,6 +1661,8 @@ deque<_Tp, _Allocator>::push_back(value_type&& __v) ++__base::size(); } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template void @@ -1672,7 +1676,8 @@ deque<_Tp, _Allocator>::emplace_back(_Args&&... __args) ++__base::size(); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1687,7 +1692,7 @@ deque<_Tp, _Allocator>::push_front(const value_type& __v) ++__base::size(); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1702,6 +1707,8 @@ deque<_Tp, _Allocator>::push_front(value_type&& __v) ++__base::size(); } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template void @@ -1716,7 +1723,8 @@ deque<_Tp, _Allocator>::emplace_front(_Args&&... __args) ++__base::size(); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename deque<_Tp, _Allocator>::iterator @@ -1779,7 +1787,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v) return __base::begin() + __pos; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename deque<_Tp, _Allocator>::iterator @@ -1836,6 +1844,8 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v) return __base::begin() + __pos; } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template typename deque<_Tp, _Allocator>::iterator @@ -1892,7 +1902,8 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args) return __base::begin() + __pos; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename deque<_Tp, _Allocator>::iterator diff --git a/include/exception b/include/exception index f02b10ff1..69b76cc78 100644 --- a/include/exception +++ b/include/exception @@ -179,16 +179,16 @@ struct __nested template void -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if< is_class::type>::value && !is_base_of::type>::value >::type* = 0) -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested (_Tp& __t, typename enable_if< is_class<_Tp>::value && !is_base_of::value >::type* = 0) -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES { #ifndef _LIBCPP_NO_EXCEPTIONS throw __nested::type>(_STD::forward<_Tp>(__t)); @@ -197,16 +197,16 @@ throw_with_nested (_Tp& __t, typename enable_if< template void -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if< !is_class::type>::value || is_base_of::type>::value >::type* = 0) -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested (_Tp& __t, typename enable_if< !is_class<_Tp>::value || is_base_of::value >::type* = 0) -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES { #ifndef _LIBCPP_NO_EXCEPTIONS throw _STD::forward<_Tp>(__t); diff --git a/include/ext/hash_map b/include/ext/hash_map index a541d374a..8b879af73 100644 --- a/include/ext/hash_map +++ b/include/ext/hash_map @@ -304,7 +304,7 @@ public: __second_constructed(false) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __hash_map_node_destructor(__hash_node_destructor&& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), @@ -312,7 +312,7 @@ public: { __x.__value_constructed = false; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES __hash_map_node_destructor(const __hash_node_destructor& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), @@ -320,7 +320,7 @@ public: { const_cast(__x.__value_constructed) = false; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void operator()(pointer __p) { diff --git a/include/forward_list b/include/forward_list index 9e68dfd47..b23981ec7 100644 --- a/include/forward_list +++ b/include/forward_list @@ -355,10 +355,10 @@ protected: __forward_list_base(const allocator_type& __a) : __before_begin_(__begin_node(), __node_allocator(__a)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __forward_list_base(__forward_list_base&& __x); __forward_list_base(__forward_list_base&& __x, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: __forward_list_base(const __forward_list_base&); @@ -405,7 +405,7 @@ private: } }; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -428,7 +428,7 @@ __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x, } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template __forward_list_base<_Tp, _Alloc>::~__forward_list_base() @@ -498,17 +498,17 @@ public: >::type* = nullptr); forward_list(const forward_list& __x); forward_list(const forward_list& __x, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES forward_list(forward_list&& __x) : base(_STD::move(__x)) {} forward_list(forward_list&& __x, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES forward_list(initializer_list __il); forward_list(initializer_list __il, const allocator_type& __a); // ~forward_list() = default; forward_list& operator=(const forward_list& __x); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES forward_list& operator=(forward_list&& __x); #endif forward_list& operator=(initializer_list __il); @@ -543,19 +543,23 @@ public: reference front() {return base::__before_begin()->__next_->__value_;} const_reference front() const {return base::__before_begin()->__next_->__value_;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template void emplace_front(_Args&&... __args); +#endif void push_front(value_type&& __v); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void push_front(const value_type& __v); void pop_front(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template iterator emplace_after(const_iterator __p, _Args&&... __args); +#endif // _LIBCPP_HAS_NO_VARIADICS iterator insert_after(const_iterator __p, value_type&& __v); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert_after(const_iterator __p, const value_type& __v); iterator insert_after(const_iterator __p, size_type __n, const value_type& __v); template @@ -577,28 +581,28 @@ public: void resize(size_type __n, const value_type& __v); void clear() {base::clear();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void splice_after(const_iterator __p, forward_list&& __x); void splice_after(const_iterator __p, forward_list&& __x, const_iterator __i); void splice_after(const_iterator __p, forward_list&& __x, const_iterator __f, const_iterator __l); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES void splice_after(const_iterator __p, forward_list& __x); void splice_after(const_iterator __p, forward_list& __x, const_iterator __i); void splice_after(const_iterator __p, forward_list& __x, const_iterator __f, const_iterator __l); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void remove(const value_type& __v); template void remove_if(_Predicate __pred); void unique() {unique(__equal_to());} template void unique(_BinaryPredicate __binary_pred); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void merge(forward_list&& __x) {merge(_STD::move(__x), __less());} template void merge(forward_list&& __x, _Compare __comp); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES void merge(forward_list& __x) {merge(__x, __less());} template void merge(forward_list& __x, _Compare __comp); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void sort() {sort(__less());} template void sort(_Compare __comp); void reverse(); @@ -609,10 +613,10 @@ private: typedef typename base::__node_traits __node_traits; typedef typename base::__node_pointer __node_pointer; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void __move_assign(forward_list& __x, true_type); void __move_assign(forward_list& __x, false_type); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template static @@ -705,7 +709,7 @@ forward_list<_Tp, _Alloc>::forward_list(const forward_list& __x, insert_after(cbefore_begin(), __x.begin(), __x.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x, @@ -719,7 +723,7 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x, } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template forward_list<_Tp, _Alloc>::forward_list(initializer_list __il) @@ -747,7 +751,7 @@ forward_list<_Tp, _Alloc>::operator=(const forward_list& __x) return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -782,7 +786,7 @@ forward_list<_Tp, _Alloc>::operator=(forward_list&& __x) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -836,7 +840,8 @@ forward_list<_Tp, _Alloc>::assign(initializer_list __il) assign(__il.begin(), __il.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template template @@ -852,6 +857,8 @@ forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args) base::__before_begin()->__next_ = __h.release(); } +#endif // _LIBCPP_HAS_NO_VARIADICS + template void forward_list<_Tp, _Alloc>::push_front(value_type&& __v) @@ -864,7 +871,7 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v) base::__before_begin()->__next_ = __h.release(); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -889,7 +896,8 @@ forward_list<_Tp, _Alloc>::pop_front() __node_traits::deallocate(__a, __p, 1); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template template @@ -907,6 +915,8 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args) return iterator(__r->__next_); } +#endif // _LIBCPP_HAS_NO_VARIADICS + template typename forward_list<_Tp, _Alloc>::iterator forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v) @@ -921,7 +931,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v) return iterator(__r->__next_); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename forward_list<_Tp, _Alloc>::iterator @@ -1137,7 +1147,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n, const value_type& __v) template void forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES forward_list&& __x) #else forward_list& __x) @@ -1162,7 +1172,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, template void forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES forward_list&& __x, #else forward_list& __x, @@ -1184,7 +1194,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, template void forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES forward_list&& __x, #else forward_list& __x, @@ -1272,7 +1282,7 @@ forward_list<_Tp, _Alloc>::unique(_BinaryPredicate __binary_pred) template template void -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES forward_list<_Tp, _Alloc>::merge(forward_list&& __x, _Compare __comp) #else forward_list<_Tp, _Alloc>::merge(forward_list& __x, _Compare __comp) diff --git a/include/fstream b/include/fstream index 0eae705b9..e0259b91d 100644 --- a/include/fstream +++ b/include/fstream @@ -189,13 +189,13 @@ public: // 27.9.1.2 Constructors/destructor: basic_filebuf(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_filebuf(basic_filebuf&& __rhs); #endif virtual ~basic_filebuf(); // 27.9.1.3 Assign/swap: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_filebuf& operator=(basic_filebuf&& __rhs); #endif void swap(basic_filebuf& __rhs); @@ -260,7 +260,7 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf() setbuf(0, 4096); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_filebuf<_CharT, _Traits>::basic_filebuf(basic_filebuf&& __rhs) @@ -333,7 +333,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs) swap(__rhs); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_filebuf<_CharT, _Traits>::~basic_filebuf() @@ -970,11 +970,11 @@ public: basic_ifstream(); explicit basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in); explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_ifstream(basic_ifstream&& __rhs); #endif -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_ifstream& operator=(basic_ifstream&& __rhs); #endif void swap(basic_ifstream& __rhs); @@ -1014,7 +1014,7 @@ basic_ifstream<_CharT, _Traits>::basic_ifstream(const string& __s, ios_base::ope this->setstate(ios_base::failbit); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1035,7 +1035,7 @@ basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1115,11 +1115,11 @@ public: basic_ofstream(); explicit basic_ofstream(const char* __s, ios_base::openmode __mode = ios_base::out); explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_ofstream(basic_ofstream&& __rhs); #endif -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_ofstream& operator=(basic_ofstream&& __rhs); #endif void swap(basic_ofstream& __rhs); @@ -1159,7 +1159,7 @@ basic_ofstream<_CharT, _Traits>::basic_ofstream(const string& __s, ios_base::ope this->setstate(ios_base::failbit); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1180,7 +1180,7 @@ basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1260,11 +1260,11 @@ public: basic_fstream(); explicit basic_fstream(const char* __s, ios_base::openmode __mode = ios_base::in | ios_base::out); explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_fstream(basic_fstream&& __rhs); #endif -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_fstream& operator=(basic_fstream&& __rhs); #endif void swap(basic_fstream& __rhs); @@ -1304,7 +1304,7 @@ basic_fstream<_CharT, _Traits>::basic_fstream(const string& __s, ios_base::openm this->setstate(ios_base::failbit); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1325,7 +1325,7 @@ basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY diff --git a/include/future b/include/future index a1f976f29..7a2eaa561 100644 --- a/include/future +++ b/include/future @@ -610,14 +610,14 @@ protected: public: template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void set_value(_Arg&& __arg); #else void set_value(_Arg& __arg); #endif template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void set_value_at_thread_exit(_Arg&& __arg); #else void set_value_at_thread_exit(_Arg& __arg); @@ -639,7 +639,7 @@ __assoc_state<_R>::__on_zero_shared() template template void -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __assoc_state<_R>::set_value(_Arg&& __arg) #else __assoc_state<_R>::set_value(_Arg& __arg) @@ -657,7 +657,7 @@ __assoc_state<_R>::set_value(_Arg& __arg) template template void -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __assoc_state<_R>::set_value_at_thread_exit(_Arg&& __arg) #else __assoc_state<_R>::set_value_at_thread_exit(_Arg& __arg) @@ -834,14 +834,14 @@ class __deferred_assoc_state _F __func_; public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit __deferred_assoc_state(_F&& __f); #endif virtual void __execute(); }; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -851,7 +851,7 @@ __deferred_assoc_state<_R, _F>::__deferred_assoc_state(_F&& __f) this->__set_deferred(); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -880,14 +880,14 @@ class __deferred_assoc_state _F __func_; public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit __deferred_assoc_state(_F&& __f); #endif virtual void __execute(); }; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -897,7 +897,7 @@ __deferred_assoc_state::__deferred_assoc_state(_F&& __f) this->__set_deferred(); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -928,7 +928,7 @@ template class future; template future<_R> -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __make_deferred_assoc_state(_F&& __f); #else __make_deferred_assoc_state(_F __f); @@ -946,7 +946,7 @@ class future template friend class atomic_future; template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES friend future<_R1> __make_deferred_assoc_state(_F&& __f); #else friend future<_R1> __make_deferred_assoc_state(_F __f); @@ -954,7 +954,7 @@ class future public: future() : __state_(nullptr) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES future(future&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} future(const future&) = delete; @@ -964,12 +964,12 @@ public: future(std::move(__rhs)).swap(*this); return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: future(const future&); future& operator=(const future&); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~future(); // retrieving the value @@ -1035,7 +1035,7 @@ class future<_R&> template friend class atomic_future; template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES friend future<_R1> __make_deferred_assoc_state(_F&& __f); #else friend future<_R1> __make_deferred_assoc_state(_F __f); @@ -1043,7 +1043,7 @@ class future<_R&> public: future() : __state_(nullptr) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES future(future&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} future(const future&) = delete; @@ -1053,12 +1053,12 @@ public: future(std::move(__rhs)).swap(*this); return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: future(const future&); future& operator=(const future&); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~future(); // retrieving the value @@ -1119,7 +1119,7 @@ class future template friend class atomic_future; template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES friend future<_R1> __make_deferred_assoc_state(_F&& __f); #else friend future<_R1> __make_deferred_assoc_state(_F __f); @@ -1127,7 +1127,7 @@ class future public: future() : __state_(nullptr) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES future(future&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} future(const future&) = delete; @@ -1137,12 +1137,12 @@ public: future(std::move(__rhs)).swap(*this); return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: future(const future&); future& operator=(const future&); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~future(); // retrieving the value @@ -1188,30 +1188,30 @@ public: promise(); template promise(allocator_arg_t, const _Alloc& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES promise(promise&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} promise(const promise& __rhs) = delete; -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: promise(const promise& __rhs); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~promise(); // assignment -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES promise& operator=(promise&& __rhs) { promise(std::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: promise& operator=(const promise& __rhs); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(promise& __rhs) {_STD::swap(__state_, __rhs.__state_);} // retrieving the result @@ -1219,14 +1219,14 @@ public: // setting the result void set_value(const _R& __r); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void set_value(_R&& __r); #endif void set_exception(exception_ptr __p); // setting the result with deferred notification void set_value_at_thread_exit(const _R& __r); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void set_value_at_thread_exit(_R&& __r); #endif void set_exception_at_thread_exit(exception_ptr __p); @@ -1281,7 +1281,7 @@ promise<_R>::set_value(const _R& __r) __state_->set_value(__r); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1292,7 +1292,7 @@ promise<_R>::set_value(_R&& __r) __state_->set_value(_STD::move(__r)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1312,7 +1312,7 @@ promise<_R>::set_value_at_thread_exit(const _R& __r) __state_->set_value_at_thread_exit(__r); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1323,7 +1323,7 @@ promise<_R>::set_value_at_thread_exit(_R&& __r) __state_->set_value_at_thread_exit(_STD::move(__r)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1349,30 +1349,30 @@ public: promise(); template promise(allocator_arg_t, const _Allocator& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES promise(promise&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} promise(const promise& __rhs) = delete; -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: promise(const promise& __rhs); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~promise(); // assignment -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES promise& operator=(promise&& __rhs) { promise(std::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: promise& operator=(const promise& __rhs); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(promise& __rhs) {_STD::swap(__state_, __rhs.__state_);} // retrieving the result @@ -1478,30 +1478,30 @@ public: promise(); template promise(allocator_arg_t, const _Allocator& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES promise(promise&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} promise(const promise& __rhs) = delete; -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: promise(const promise& __rhs); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~promise(); // assignment -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES promise& operator=(promise&& __rhs) { promise(std::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES private: promise& operator=(const promise& __rhs); public: -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(promise& __rhs) {_STD::swap(__state_, __rhs.__state_);} // retrieving the result @@ -2021,7 +2021,7 @@ struct uses_allocator, _Alloc> : public true_type {}; template future<_R> -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __make_deferred_assoc_state(_F&& __f) #else __make_deferred_assoc_state(_F __f) @@ -2077,21 +2077,21 @@ public: shared_future() : __state_(nullptr) {} shared_future(const shared_future& __rhs) : __state_(__rhs.__state_) {if (__state_) __state_->__add_shared();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_future(future<_R>&& __f) : __state_(__f.__state_) {__f.__state_ = nullptr;} shared_future(shared_future&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~shared_future(); shared_future& operator=(const shared_future& __rhs); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_future& operator=(shared_future&& __rhs) { shared_future(std::move(__rhs)).swap(*this); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES // retrieving the value const _R& get() const {return __state_->copy();} @@ -2140,21 +2140,21 @@ public: shared_future() : __state_(nullptr) {} shared_future(const shared_future& __rhs) : __state_(__rhs.__state_) {if (__state_) __state_->__add_shared();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_future(future<_R&>&& __f) : __state_(__f.__state_) {__f.__state_ = nullptr;} shared_future(shared_future&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~shared_future(); shared_future& operator=(const shared_future& __rhs); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_future& operator=(shared_future&& __rhs) { shared_future(std::move(__rhs)).swap(*this); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES // retrieving the value _R& get() const {return __state_->copy();} @@ -2203,21 +2203,21 @@ public: shared_future() : __state_(nullptr) {} shared_future(const shared_future& __rhs) : __state_(__rhs.__state_) {if (__state_) __state_->__add_shared();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_future(future&& __f) : __state_(__f.__state_) {__f.__state_ = nullptr;} shared_future(shared_future&& __rhs) : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~shared_future(); shared_future& operator=(const shared_future& __rhs); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_future& operator=(shared_future&& __rhs) { shared_future(std::move(__rhs)).swap(*this); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES // retrieving the value void get() const {__state_->copy();} @@ -2258,10 +2258,10 @@ public: atomic_future() : __state_(nullptr) {} atomic_future(const atomic_future& __rhs) : __state_(__rhs.__state_) {if (__state_) __state_->__add_shared();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES atomic_future(future<_R>&& __f) : __state_(__f.__state_) {__f.__state_ = nullptr;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~atomic_future(); atomic_future& operator=(const atomic_future& __rhs); @@ -2332,10 +2332,10 @@ public: atomic_future() : __state_(nullptr) {} atomic_future(const atomic_future& __rhs) : __state_(__rhs.__state_) {if (__state_) __state_->__add_shared();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES atomic_future(future<_R&>&& __f) : __state_(__f.__state_) {__f.__state_ = nullptr;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~atomic_future(); atomic_future& operator=(const atomic_future& __rhs); @@ -2406,10 +2406,10 @@ public: atomic_future() : __state_(nullptr) {} atomic_future(const atomic_future& __rhs) : __state_(__rhs.__state_) {if (__state_) __state_->__add_shared();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES atomic_future(future&& __f) : __state_(__f.__state_) {__f.__state_ = nullptr;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~atomic_future(); atomic_future& operator=(const atomic_future& __rhs); diff --git a/include/ios b/include/ios index d0016befc..561c35112 100644 --- a/include/ios +++ b/include/ios @@ -609,7 +609,7 @@ protected: void init(basic_streambuf* __sb); void move(basic_ios& __rhs); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void move(basic_ios&& __rhs) {move(__rhs);} #endif void swap(basic_ios& __rhs); diff --git a/include/istream b/include/istream index e79d6ebd5..d71ec55a7 100644 --- a/include/istream +++ b/include/istream @@ -176,12 +176,12 @@ public: explicit basic_istream(basic_streambuf* __sb); virtual ~basic_istream(); protected: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_istream(basic_istream&& __rhs); #endif // 27.7.1.1.2 Assign/swap: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_istream& operator=(basic_istream&& __rhs); #endif void swap(basic_istream& __rhs); @@ -287,7 +287,7 @@ basic_istream<_CharT, _Traits>::basic_istream(basic_streambufinit(__sb); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -307,7 +307,7 @@ basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_istream<_CharT, _Traits>::~basic_istream() @@ -1463,7 +1463,7 @@ ws(basic_istream<_CharT, _Traits>& __is) return __is; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1474,7 +1474,7 @@ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) return __is; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template class basic_iostream @@ -1493,12 +1493,12 @@ public: explicit basic_iostream(basic_streambuf* __sb); virtual ~basic_iostream(); protected: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_iostream(basic_iostream&& __rhs); #endif // assign/swap -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_iostream& operator=(basic_iostream&& __rhs); #endif void swap(basic_iostream& __rhs); @@ -1512,7 +1512,7 @@ basic_iostream<_CharT, _Traits>::basic_iostream(basic_streambuf inline _LIBCPP_INLINE_VISIBILITY @@ -1530,7 +1530,7 @@ basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_iostream<_CharT, _Traits>::~basic_iostream() @@ -1655,7 +1655,7 @@ getline(basic_istream<_CharT, _Traits>& __is, return getline(__is, __str, __is.widen('\n')); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -1675,7 +1675,7 @@ getline(basic_istream<_CharT, _Traits>&& __is, return getline(__is, __str, __is.widen('\n')); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_istream<_CharT, _Traits>& diff --git a/include/iterator b/include/iterator index 51f4d4ffc..b83609091 100644 --- a/include/iterator +++ b/include/iterator @@ -626,10 +626,10 @@ public: _LIBCPP_INLINE_VISIBILITY explicit back_insert_iterator(_Container& __x) : container(&__x) {} _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::const_reference __value) {container->push_back(__value); return *this;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::value_type&& __value) {container->push_back(_STD::move(__value)); return *this;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator++() {return *this;} _LIBCPP_INLINE_VISIBILITY back_insert_iterator operator++(int) {return *this;} @@ -659,10 +659,10 @@ public: _LIBCPP_INLINE_VISIBILITY explicit front_insert_iterator(_Container& __x) : container(&__x) {} _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::const_reference __value) {container->push_front(__value); return *this;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::value_type&& __value) {container->push_front(_STD::move(__value)); return *this;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator++() {return *this;} _LIBCPP_INLINE_VISIBILITY front_insert_iterator operator++(int) {return *this;} @@ -694,10 +694,10 @@ public: : container(&__x), iter(__i) {} _LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::const_reference __value) {iter = container->insert(iter, __value); ++iter; return *this;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::value_type&& __value) {iter = container->insert(iter, _STD::move(__value)); ++iter; return *this;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY insert_iterator& operator++() {return *this;} _LIBCPP_INLINE_VISIBILITY insert_iterator& operator++(int) {return *this;} @@ -890,7 +890,7 @@ public: typedef typename iterator_traits::value_type value_type; typedef typename iterator_traits::difference_type difference_type; typedef typename iterator_traits::pointer pointer; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef value_type&& reference; #else typedef typename iterator_traits::reference reference; @@ -1615,7 +1615,7 @@ operator+(typename __debug_iter<_Container, _Iter>::difference_type __n, #endif // _LIBCPP_DEBUG -#if defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE) +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE) template inline @@ -1649,7 +1649,7 @@ end(const _C& __c) -> decltype(__c.end()) return __c.end(); } -#else // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE) +#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE) template inline @@ -1683,7 +1683,7 @@ end(const _C& __c) return __c.end(); } -#endif // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE) +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE) template inline diff --git a/include/list b/include/list index 2fb90aae5..0336c9fa3 100644 --- a/include/list +++ b/include/list @@ -501,11 +501,11 @@ public: list& operator=(const list& __c); list(initializer_list __il); list(initializer_list __il, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES list(list&& __c); list(list&& __c, const allocator_type& __a); list& operator=(list&& __c); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES list& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} @@ -541,17 +541,19 @@ public: reference back() {return base::__end_.__prev_->__value_;} const_reference back() const {return base::__end_.__prev_->__value_;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void push_front(value_type&& __x); void push_back(value_type&& __x); +#ifndef _LIBCPP_HAS_NO_VARIADICS template void emplace_front(_Args&&... __args); template void emplace_back(_Args&&... __args); template iterator emplace(const_iterator __p, _Args&&... __args); +#endif // _LIBCPP_HAS_NO_VARIADICS iterator insert(const_iterator __p, value_type&& __x); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void push_front(const value_type& __x); void push_back(const value_type& __x); @@ -577,19 +579,19 @@ public: void resize(size_type __n, const value_type& __x); void splice(const_iterator __p, list& __c); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void splice(const_iterator __p, list&& __c) {splice(__p, __c);} #endif void splice(const_iterator __p, list& __c, const_iterator __i); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void splice(const_iterator __p, list&& __c, const_iterator __i) {splice(__p, __c, __i);} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void splice(const_iterator __p, list&& __c, const_iterator __f, const_iterator __l) {splice(__p, __c, __f, __l);} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void remove(const value_type& __x); template void remove_if(_Pred __pred); @@ -597,15 +599,15 @@ public: template void unique(_BinaryPred __binary_pred); void merge(list& __c); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void merge(list&& __c) {merge(__c);} #endif template void merge(list& __c, _Comp __comp); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void merge(list&& __c, _Comp __comp) {merge(__c, __comp);} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void sort(); template void sort(_Comp __comp); @@ -647,7 +649,7 @@ template list<_Tp, _Alloc>::list(size_type __n) { for (; __n > 0; --__n) -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES emplace_back(); #else push_back(value_type()); @@ -736,7 +738,7 @@ list<_Tp, _Alloc>::operator=(const list& __c) return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -792,7 +794,7 @@ list<_Tp, _Alloc>::__move_assign(list& __c, true_type) splice(end(), __c); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -976,7 +978,7 @@ list<_Tp, _Alloc>::push_back(const value_type& __x) __hold.release(); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1004,6 +1006,8 @@ list<_Tp, _Alloc>::push_back(value_type&& __x) __hold.release(); } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template void @@ -1047,6 +1051,8 @@ list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args) return iterator(__hold.release()); } +#endif // _LIBCPP_HAS_NO_VARIADICS + template typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) @@ -1061,7 +1067,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) return iterator(__hold.release()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void diff --git a/include/locale b/include/locale index 1bef153e4..047da71a4 100644 --- a/include/locale +++ b/include/locale @@ -3564,7 +3564,7 @@ public: wstring_convert(_Codecvt* __pcvt, state_type __state); wstring_convert(const byte_string& __byte_err, const wide_string& __wide_err = wide_string()); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES wstring_convert(wstring_convert&& __wc); #endif ~wstring_convert(); @@ -3614,7 +3614,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: __cvtptr_ = new _Codecvt; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -3628,7 +3628,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: __wc.__cvtptr_ = nullptr; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS template wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::~wstring_convert() diff --git a/include/map b/include/map index 6fe4bcd31..36c2acb27 100644 --- a/include/map +++ b/include/map @@ -455,7 +455,7 @@ public: __second_constructed(false) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __map_node_destructor(__tree_node_destructor&& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), @@ -463,7 +463,7 @@ public: { __x.__value_constructed = false; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS void operator()(pointer __p) { @@ -672,7 +672,7 @@ public: insert(__m.begin(), __m.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES map(map&& __m) : __tree_(_STD::move(__m.__tree_)) @@ -705,7 +705,7 @@ public: return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS explicit map(const allocator_type& __a) : __tree_(__a) @@ -738,7 +738,7 @@ public: size_type max_size() const {return __tree_.max_size();} mapped_type& operator[](const key_type& __k); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES mapped_type& operator[](key_type&& __k); #endif @@ -749,7 +749,7 @@ public: key_compare key_comp() const {return __tree_.value_comp().key_comp();} value_compare value_comp() const {return value_compare(__tree_.value_comp().key_comp());} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES pair emplace() {return __tree_.__emplace_unique();} @@ -760,11 +760,15 @@ public: emplace(_A0&& __a0) {return __tree_.__emplace_unique(_STD::forward<_A0>(__a0));} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> pair emplace(_A0&& __a0, _Args&& ...__args); +#endif // _LIBCPP_HAS_NO_VARIADICS + iterator emplace_hint(const_iterator __p) {return __tree_.__emplace_hint_unique(__p.__i_);} @@ -775,11 +779,15 @@ public: emplace_hint(const_iterator __p, _A0&& __a0) {return __tree_.__emplace_hint_unique(__p.__i_, _STD::forward<_A0>(__a0));} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> iterator emplace_hint(const_iterator __p, _A0&& __a0, _Args&& ...__args); +#endif // _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> pair insert(_P&& __p) @@ -790,7 +798,7 @@ public: iterator insert(const_iterator __pos, _P&& __p) {return __tree_.__insert_unique(__pos.__i_, _STD::forward<_P>(__p));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES pair insert(const value_type& __v) {return __tree_.__insert_unique(__v);} @@ -845,15 +853,17 @@ private: typedef __map_node_destructor<__node_allocator> _D; typedef unique_ptr<__node, _D> __node_holder; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __node_holder __construct_node(); template ::value>::type> __node_holder __construct_node(_A0&& __a0); +#ifndef _LIBCPP_HAS_NO_VARIADICS template ::value>::type> __node_holder __construct_node(_A0&& __a0, _Args&& ...__args); -#else // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES __node_holder __construct_node(const key_type& __k); #endif @@ -1016,7 +1026,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__find_equal_key(__node_base_const_pointer return const_cast(__parent->__left_); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template map<_Key, _Tp, _Compare, _Allocator>::map(map&& __m, const allocator_type& __a) @@ -1058,6 +1068,8 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0) return __h; } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template @@ -1073,7 +1085,9 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&& ...__ return __h; } -#else // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS + +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename map<_Key, _Tp, _Compare, _Allocator>::__node_holder @@ -1088,7 +1102,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(const key_type& __k) return _STD::move(__h); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp& @@ -1106,7 +1120,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k) return __r->__value_.second; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp& @@ -1124,7 +1138,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k) return __r->__value_.second; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp& @@ -1152,7 +1166,7 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const return static_cast<__node_const_pointer>(__child)->__value_.second; } -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template template ::emplace_hint(const_iterator __p, return __r; } -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template inline @@ -1332,7 +1346,7 @@ public: insert(__m.begin(), __m.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES multimap(multimap&& __m) : __tree_(_STD::move(__m.__tree_)) @@ -1364,7 +1378,7 @@ public: __tree_.__assign_multi(__il.begin(), __il.end()); return *this; } -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) explicit multimap(const allocator_type& __a) : __tree_(__a) @@ -1400,7 +1414,7 @@ public: key_compare key_comp() const {return __tree_.value_comp().key_comp();} value_compare value_comp() const {return value_compare(__tree_.value_comp().key_comp());} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator emplace() {return __tree_.__emplace_multi();} @@ -1410,11 +1424,15 @@ public: emplace(_A0&& __a0) {return __tree_.__emplace_multi(_STD::forward<_A0>(__a0));} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> iterator emplace(_A0&& __a0, _Args&& ...__args); +#endif // _LIBCPP_HAS_NO_VARIADICS + iterator emplace_hint(const_iterator __p) {return __tree_.__emplace_hint_multi(__p.__i_);} @@ -1424,11 +1442,15 @@ public: emplace_hint(const_iterator __p, _A0&& __a0) {return __tree_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> iterator emplace_hint(const_iterator __p, _A0&& __a0, _Args&& ...__args); +#endif // _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> iterator insert(_P&& __p) @@ -1439,7 +1461,7 @@ public: iterator insert(const_iterator __pos, _P&& __p) {return __tree_.__insert_multi(__pos.__i_, _STD::forward<_P>(__p));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const value_type& __v) {return __tree_.__insert_multi(__v);} @@ -1489,18 +1511,20 @@ private: typedef __map_node_destructor<__node_allocator> _D; typedef unique_ptr<__node, _D> __node_holder; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __node_holder __construct_node(); template ::value>::type> __node_holder __construct_node(_A0&& __a0); +#ifndef _LIBCPP_HAS_NO_VARIADICS template ::value>::type> __node_holder __construct_node(_A0&& __a0, _Args&& ...__args); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES }; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template multimap<_Key, _Tp, _Compare, _Allocator>::multimap(multimap&& __m, const allocator_type& __a) @@ -1543,6 +1567,8 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0) return __h; } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template ::value>::type @@ -1559,9 +1585,10 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&& return __h; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template template ::emplace_hint(const_iterator __p, return __r; } -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template inline diff --git a/include/memory b/include/memory index db80d4135..5b2b41dcf 100644 --- a/include/memory +++ b/include/memory @@ -1448,7 +1448,7 @@ struct uses_allocator { }; -#if defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) // uses-allocator construction @@ -1466,7 +1466,7 @@ struct __uses_alloc_ctor : integral_constant::value> {}; -#endif // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) // allocator @@ -1492,7 +1492,7 @@ public: {return static_cast(::operator new(__n * sizeof(_Tp)));} _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) {::operator delete((void*)__p);} _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template _LIBCPP_INLINE_VISIBILITY void @@ -1500,7 +1500,7 @@ public: { ::new((void*)__p) _Up(_STD::forward<_Args>(__args)...); } -#else // _LIBCPP_MOVE +#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) _LIBCPP_INLINE_VISIBILITY void construct(pointer __p) @@ -1568,7 +1568,7 @@ public: { ::new((void*)__p) _Tp(__a0, __a1); } -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();} }; @@ -1732,10 +1732,10 @@ public: _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2) : __first_(_STD::forward<_T1_param>(__t1)), __second_(_STD::forward<_T2_param>(__t2)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p) : __first_(_STD::forward<_T1>(__p.first())), __second_(_STD::forward<_T2>(__p.second())) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY _T1_reference first() {return __first_;} _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return __first_;} @@ -1775,10 +1775,10 @@ public: _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2) : _T1(_STD::forward<_T1_param>(__t1)), __second_(_STD::forward<_T2_param>(__t2)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p) : _T1(_STD::move(__p.first())), __second_(_STD::forward<_T2>(__p.second())) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY _T1_reference first() {return *this;} _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return *this;} @@ -1817,10 +1817,10 @@ public: _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2) : _T2(_STD::forward<_T2_param>(__t2)), __first_(_STD::forward<_T1_param>(__t1)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p) : _T2(_STD::forward<_T2>(__p.second())), __first_(_STD::move(__p.first())) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY _T1_reference first() {return __first_;} _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return __first_;} @@ -1858,10 +1858,10 @@ public: _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2) : _T1(_STD::forward<_T1_param>(__t1)), _T2(_STD::forward<_T2_param>(__t2)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p) : _T1(_STD::move(__p.first())), _T2(_STD::move(__p.second())) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY _T1_reference first() {return *this;} _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return *this;} @@ -1897,10 +1897,10 @@ public: _LIBCPP_INLINE_VISIBILITY __compressed_pair(_T1_param __t1, _T2_param __t2) : base(_STD::forward<_T1_param>(__t1), _STD::forward<_T2_param>(__t2)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __compressed_pair(__compressed_pair&& __p) : base(_STD::move(__p)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY _T1_reference first() {return base::first();} _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return base::first();} @@ -1953,21 +1953,21 @@ public: private: __compressed_pair __ptr_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unique_ptr(const unique_ptr&); unique_ptr& operator=(const unique_ptr&); template unique_ptr(const unique_ptr<_Up, _Ep>&); template unique_ptr& operator=(const unique_ptr<_Up, _Ep>&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES unique_ptr(unique_ptr&); template unique_ptr(unique_ptr<_Up, _Ep>&); unique_ptr& operator=(unique_ptr&); template unique_ptr& operator=(unique_ptr<_Up, _Ep>&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES struct __nat {int __for_bool_;}; @@ -1993,7 +1993,7 @@ public: "unique_ptr constructed with null function pointer deleter"); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, typename conditional< is_reference::value, deleter_type, @@ -2054,7 +2054,7 @@ public: __ptr_.second() = _STD::forward<_Ep>(__u.get_deleter()); return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY operator __rv() { @@ -2085,7 +2085,7 @@ public: operator=(auto_ptr<_Up> __p) {reset(__p.release()); return *this;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY ~unique_ptr() {reset();} _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(nullptr_t) @@ -2130,17 +2130,17 @@ public: private: __compressed_pair __ptr_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unique_ptr(const unique_ptr&); unique_ptr& operator=(const unique_ptr&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES unique_ptr(unique_ptr&); template unique_ptr(unique_ptr<_Up>&); unique_ptr& operator=(unique_ptr&); template unique_ptr& operator=(unique_ptr<_Up>&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES struct __nat {int __for_bool_;}; @@ -2159,7 +2159,7 @@ public: static_assert(!is_pointer::value, "unique_ptr constructed with null function pointer deleter"); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template ::value>::type > @@ -2210,7 +2210,7 @@ public: __ptr_.second() = _STD::forward(__u.get_deleter()); return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY explicit unique_ptr(pointer __p) : __ptr_(__p) @@ -2240,7 +2240,7 @@ public: return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY ~unique_ptr() {reset();} _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(nullptr_t) @@ -2263,7 +2263,7 @@ public: return __t; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template ::value>::type > @@ -2288,7 +2288,7 @@ public: if (__tmp) __ptr_.second()(__tmp); } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY void reset(pointer __p = pointer()) { pointer __tmp = __ptr_.first(); @@ -2296,12 +2296,12 @@ public: if (__tmp) __ptr_.second()(__tmp); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY void swap(unique_ptr& __u) {__ptr_.swap(__u.__ptr_);} private: -#ifndef _LIBCPP_MOVE +#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES template explicit unique_ptr(_Up); template @@ -2315,7 +2315,7 @@ private: is_convertible<_Up, pointer>::value, __nat >::type = __nat()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES }; template @@ -2667,19 +2667,19 @@ public: template shared_ptr(const shared_ptr<_Yp>& __r, typename enable_if::value, __nat>::type = __nat()); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_ptr(shared_ptr&& __r); template shared_ptr(shared_ptr<_Yp>&& __r, typename enable_if::value, __nat>::type = __nat()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template explicit shared_ptr(const weak_ptr<_Yp>& __r, typename enable_if::value, __nat>::type= __nat()); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template shared_ptr(auto_ptr<_Yp>&& __r); #else template shared_ptr(auto_ptr<_Yp> __r); #endif -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES private: template shared_ptr(const unique_ptr<_Yp, _Dp>& __r);// = delete; public: @@ -2687,30 +2687,30 @@ public: typename enable_if::value, __nat>::type = __nat()); template shared_ptr(unique_ptr<_Yp, _Dp>&&, typename enable_if::value, __nat>::type = __nat()); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template shared_ptr(unique_ptr<_Yp, _Dp>, typename enable_if::value, __nat>::type = __nat()); template shared_ptr(unique_ptr<_Yp, _Dp>, typename enable_if::value, __nat>::type = __nat()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES ~shared_ptr(); shared_ptr& operator=(const shared_ptr& __r); template shared_ptr& operator=(const shared_ptr<_Yp>& __r); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_ptr& operator=(shared_ptr&& __r); template shared_ptr& operator=(shared_ptr<_Yp>&& __r); template shared_ptr& operator=(auto_ptr<_Yp>&& __r); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template shared_ptr& operator=(auto_ptr<_Yp> __r); #endif -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES private: template shared_ptr& operator=(const unique_ptr<_Yp, _Dp>& __r);// = delete; public: template shared_ptr& operator=(unique_ptr<_Yp, _Dp>&& __r); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template shared_ptr& operator=(unique_ptr<_Yp, _Dp> __r); #endif @@ -2954,7 +2954,7 @@ shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r, __cntrl_->__add_shared(); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -2978,11 +2978,11 @@ shared_ptr<_Tp>::shared_ptr(shared_ptr<_Yp>&& __r, __r.__cntrl_ = 0; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp>&& __r) #else shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r) @@ -2997,7 +2997,7 @@ shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r) template template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r, #else shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r, @@ -3013,7 +3013,7 @@ shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r, template template -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r, #else shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r, @@ -3240,7 +3240,7 @@ shared_ptr<_Tp>::operator=(const shared_ptr<_Yp>& __r) return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -3281,7 +3281,7 @@ shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp>&& __r) return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -3303,7 +3303,7 @@ shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp> __r) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY diff --git a/include/mutex b/include/mutex index ac8ca2bcc..8ab9c2ae5 100644 --- a/include/mutex +++ b/include/mutex @@ -456,7 +456,7 @@ class __call_once_param { _F __f_; public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit __call_once_param(_F&& __f) : __f_(_STD::move(__f)) {} #else explicit __call_once_param(const _F& __f) : __f_(__f) {} diff --git a/include/ostream b/include/ostream index 90f34036a..7b02716d7 100644 --- a/include/ostream +++ b/include/ostream @@ -153,12 +153,12 @@ public: explicit basic_ostream(basic_streambuf* __sb); virtual ~basic_ostream(); protected: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_ostream(basic_ostream&& __rhs); #endif // 27.7.2.3 Assign/swap -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_ostream& operator=(basic_ostream&& __rhs); #endif void swap(basic_ostream& __rhs); @@ -261,7 +261,7 @@ basic_ostream<_CharT, _Traits>::basic_ostream(basic_streambufinit(__sb); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -279,7 +279,7 @@ basic_ostream<_CharT, _Traits>::operator=(basic_ostream&& __rhs) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_ostream<_CharT, _Traits>::~basic_ostream() @@ -1206,7 +1206,7 @@ flush(basic_ostream<_CharT, _Traits>& __os) return __os; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1222,7 +1222,7 @@ operator<<(_Stream&& __os, const _Tp& __x) return __os; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_ostream<_CharT, _Traits>& diff --git a/include/queue b/include/queue index 7c328eaf6..f5e8d264a 100644 --- a/include/queue +++ b/include/queue @@ -182,10 +182,10 @@ protected: public: queue() : c() {} explicit queue(const container_type& __c) : c(__c) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit queue(container_type&& __c) : c(_STD::move(__c)) {} queue(queue&& __q) : c(_STD::move(__q.c)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template explicit queue(const _Alloc& __a, typename enable_if::value>::type* = 0) : c(__c, __a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template queue(container_type&& __c, const _Alloc& __a, typename enable_if void emplace(_Args&&... __args) {c.emplace_back(_STD::forward<_Args>(__args)...);} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void pop() {c.pop_front();} void swap(queue& __q) @@ -336,7 +338,7 @@ public: explicit priority_queue(const value_compare& __comp = value_compare()) : c(), comp(__comp) {} priority_queue(const value_compare& __comp, const container_type& __c); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit priority_queue(const value_compare& __comp, container_type&& __c); #endif template @@ -345,13 +347,13 @@ public: template priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, const container_type& __c); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, container_type&& __c); priority_queue(priority_queue&& __q); priority_queue& operator=(priority_queue&& __q); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template explicit priority_queue(const _Alloc& __a, typename enable_if::value>::type* = 0); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template priority_queue(const value_compare& __comp, container_type&& __c, const _Alloc& __a, @@ -379,17 +381,19 @@ public: priority_queue(priority_queue&& __q, const _Alloc& __a, typename enable_if::value>::type* = 0); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES bool empty() const {return c.empty();} size_type size() const {return c.size();} const_reference top() const {return c.front();} void push(const value_type& __v); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void push(value_type&& __v); +#ifndef _LIBCPP_HAS_NO_VARIADICS template void emplace(_Args&&... __args); -#endif // _LIBCPP_MOVE +#endif +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void pop(); void swap(priority_queue& __q); @@ -405,7 +409,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Compare& __comp _STD::make_heap(c.begin(), c.end(), comp); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -417,7 +421,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& _ _STD::make_heap(c.begin(), c.end(), comp); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -443,7 +447,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _Input _STD::make_heap(c.begin(), c.end(), comp); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -475,7 +479,7 @@ priority_queue<_Tp, _Container, _Compare>::operator=(priority_queue&& __q) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -526,7 +530,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue& _STD::make_heap(c.begin(), c.end(), comp); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -555,7 +559,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q, _STD::make_heap(c.begin(), c.end(), comp); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -566,7 +570,7 @@ priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v) _STD::push_heap(c.begin(), c.end(), comp); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -577,6 +581,8 @@ priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v) _STD::push_heap(c.begin(), c.end(), comp); } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template inline @@ -587,7 +593,8 @@ priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args) _STD::push_heap(c.begin(), c.end(), comp); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline diff --git a/include/random b/include/random index e925f6d47..5de738ad9 100644 --- a/include/random +++ b/include/random @@ -2685,10 +2685,10 @@ public: discard_block_engine() : __n_(0) {} explicit discard_block_engine(const _Engine& __e) : __e_(__e), __n_(0) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit discard_block_engine(_Engine&& __e) : __e_(_STD::move(__e)), __n_(0) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {} template explicit discard_block_engine(_Sseq& __q, typename enable_if::value && @@ -2872,10 +2872,10 @@ public: independent_bits_engine() {} explicit independent_bits_engine(const _Engine& __e) : __e_(__e) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit independent_bits_engine(_Engine&& __e) : __e_(_STD::move(__e)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit independent_bits_engine(result_type __sd) : __e_(__sd) {} template explicit independent_bits_engine(_Sseq& __q, typename enable_if::value && @@ -3080,10 +3080,10 @@ public: shuffle_order_engine() {__init();} explicit shuffle_order_engine(const _Engine& __e) : __e_(__e) {__init();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit shuffle_order_engine(_Engine&& __e) : __e_(_STD::move(__e)) {__init();} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();} template explicit shuffle_order_engine(_Sseq& __q, typename enable_if::value && diff --git a/include/regex b/include/regex index 25aab82cb..828c6de5a 100644 --- a/include/regex +++ b/include/regex @@ -5185,10 +5185,8 @@ public: explicit match_results(const allocator_type& __a = allocator_type()); // match_results(const match_results&) = default; // match_results& operator=(const match_results&) = default; -#ifdef _LIBCPP_MOVE // match_results(match_results&& __m) = default; // match_results& operator=(match_results&& __m) = default; -#endif // _LIBCPP_MOVE // ~match_results() = default; // size: diff --git a/include/scoped_allocator b/include/scoped_allocator index d94c7853c..c9544b81f 100644 --- a/include/scoped_allocator +++ b/include/scoped_allocator @@ -107,7 +107,7 @@ template _LIBCPP_BEGIN_NAMESPACE_STD -#if defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) // scoped_allocator_adaptor @@ -526,7 +526,7 @@ operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a, return !(__a == __b); } -#endif // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) _LIBCPP_END_NAMESPACE_STD diff --git a/include/set b/include/set index 2ee4044b9..110f599f6 100644 --- a/include/set +++ b/include/set @@ -365,10 +365,10 @@ public: insert(__s.begin(), __s.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES set(set&& __s) : __tree_(_STD::move(__s.__tree_)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit set(const allocator_type& __a) : __tree_(__a) {} @@ -379,7 +379,7 @@ public: insert(__s.begin(), __s.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES set(set&& __s, const allocator_type& __a); #endif @@ -402,13 +402,13 @@ public: return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES set& operator=(set&& __s) { __tree_ = _STD::move(__s.__tree_); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator begin() {return __tree_.begin();} const_iterator begin() const {return __tree_.begin();} @@ -430,26 +430,26 @@ public: size_type max_size() const {return __tree_.max_size();} // modifiers: -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template pair emplace(_Args&&... __args) {return __tree_.__emplace_unique(_STD::forward<_Args>(__args)...);} template iterator emplace_hint(const_iterator __p, _Args&&... __args) {return __tree_.__emplace_hint_unique(__p, _STD::forward<_Args>(__args)...);} -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) pair insert(const value_type& __v) {return __tree_.__insert_unique(__v);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES pair insert(value_type&& __v) {return __tree_.__insert_unique(_STD::move(__v));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __p, const value_type& __v) {return __tree_.__insert_unique(__p, __v);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __p, value_type&& __v) {return __tree_.__insert_unique(__p, _STD::move(__v));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __f, _InputIterator __l) { @@ -492,7 +492,7 @@ public: {return __tree_.__equal_range_unique(__k);} }; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a) @@ -506,7 +506,7 @@ set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a) } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -631,10 +631,10 @@ public: insert(__s.begin(), __s.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES multiset(multiset&& __s) : __tree_(_STD::move(__s.__tree_)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit multiset(const allocator_type& __a) : __tree_(__a) {} multiset(const multiset& __s, const allocator_type& __a) @@ -642,7 +642,7 @@ public: { insert(__s.begin(), __s.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES multiset(multiset&& __s, const allocator_type& __a); #endif @@ -665,13 +665,13 @@ public: return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES multiset& operator=(multiset&& __s) { __tree_ = _STD::move(__s.__tree_); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator begin() {return __tree_.begin();} const_iterator begin() const {return __tree_.begin();} @@ -693,26 +693,26 @@ public: size_type max_size() const {return __tree_.max_size();} // modifiers: -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template iterator emplace(_Args&&... __args) {return __tree_.__emplace_multi(_STD::forward<_Args>(__args)...);} template iterator emplace_hint(const_iterator __p, _Args&&... __args) {return __tree_.__emplace_hint_multi(__p, _STD::forward<_Args>(__args)...);} -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) iterator insert(const value_type& __v) {return __tree_.__insert_multi(__v);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(value_type&& __v) {return __tree_.__insert_multi(_STD::move(__v));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __p, const value_type& __v) {return __tree_.__insert_multi(__p, __v);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __p, value_type&& __v) {return __tree_.__insert_multi(_STD::move(__v));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __f, _InputIterator __l) { @@ -754,7 +754,7 @@ public: {return __tree_.__equal_range_multi(__k);} }; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_type& __a) @@ -768,7 +768,7 @@ multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_t } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline diff --git a/include/sstream b/include/sstream index 07b6ad4a1..e1b69ca49 100644 --- a/include/sstream +++ b/include/sstream @@ -206,12 +206,12 @@ public: explicit basic_stringbuf(ios_base::openmode __wch = ios_base::in | ios_base::out); explicit basic_stringbuf(const string_type& __s, ios_base::openmode __wch = ios_base::in | ios_base::out); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_stringbuf(basic_stringbuf&& __rhs); #endif // 27.8.1.2 Assign and swap: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_stringbuf& operator=(basic_stringbuf&& __rhs); #endif void swap(basic_stringbuf& __rhs); @@ -250,7 +250,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type& str(__s); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&& __rhs) @@ -298,7 +298,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -546,12 +546,12 @@ public: explicit basic_istringstream(ios_base::openmode __wch = ios_base::in); explicit basic_istringstream(const string_type& __s, ios_base::openmode __wch = ios_base::in); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_istringstream(basic_istringstream&& __rhs); // 27.8.2.2 Assign and swap: basic_istringstream& operator=(basic_istringstream&& __rhs); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(basic_istringstream& __rhs); // 27.8.2.3 Members: @@ -577,7 +577,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const stri { } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -597,7 +597,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::operator=(basic_istringstream& return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -665,12 +665,12 @@ public: explicit basic_ostringstream(ios_base::openmode __wch = ios_base::out); explicit basic_ostringstream(const string_type& __s, ios_base::openmode __wch = ios_base::out); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_ostringstream(basic_ostringstream&& __rhs); // 27.8.2.2 Assign and swap: basic_ostringstream& operator=(basic_ostringstream&& __rhs); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(basic_ostringstream& __rhs); // 27.8.2.3 Members: @@ -696,7 +696,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const stri { } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -716,7 +716,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::operator=(basic_ostringstream& return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -784,12 +784,12 @@ public: explicit basic_stringstream(ios_base::openmode __wch = ios_base::in | ios_base::out); explicit basic_stringstream(const string_type& __s, ios_base::openmode __wch = ios_base::in | ios_base::out); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_stringstream(basic_stringstream&& __rhs); // 27.8.2.2 Assign and swap: basic_stringstream& operator=(basic_stringstream&& __rhs); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(basic_stringstream& __rhs); // 27.8.2.3 Members: @@ -815,7 +815,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string { } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -835,7 +835,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::operator=(basic_stringstream&& return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY diff --git a/include/stack b/include/stack index f4be79bf7..773737954 100644 --- a/include/stack +++ b/include/stack @@ -107,11 +107,11 @@ protected: public: stack() : c() {} explicit stack(const container_type& __c) : c(__c) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES explicit stack(container_type&& __c) : c(_STD::move(__c)) {} stack(stack&& __s) : c(_STD::move(__s.c)) {} stack& operator=(stack&& __s) {c = _STD::move(__s.c); return *this;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template explicit stack(const _Alloc& __a, typename enable_if::value>::type* = 0) : c(__s.c, __a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template stack(container_type&& __c, const _Alloc& __a, typename enable_if::value>::type* = 0) : c(_STD::move(__s.c), __a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES bool empty() const {return c.empty();} size_type size() const {return c.size();} @@ -146,11 +146,13 @@ public: const_reference top() const {return c.back();} void push(const value_type& __v) {c.push_back(__v);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void push(value_type&& __v) {c.push_back(_STD::move(__v));} +#ifndef _LIBCPP_HAS_NO_VARIADICS template void emplace(_Args&&... __args) {c.emplace_back(_STD::forward<_Args>(__args)...);} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void pop() {c.pop_back();} void swap(stack& __s) diff --git a/include/string b/include/string index 8d880a3a0..fc15bc8a5 100644 --- a/include/string +++ b/include/string @@ -1031,10 +1031,10 @@ public: explicit basic_string(const allocator_type& __a); basic_string(const basic_string& __str); basic_string(const basic_string& __str, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_string(basic_string&& __str); basic_string(basic_string&& __str, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES basic_string(const_pointer __s); basic_string(const_pointer __s, const allocator_type& __a); basic_string(const_pointer __s, size_type __n); @@ -1053,7 +1053,7 @@ public: ~basic_string(); _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const basic_string& __str) {return assign(__str);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY basic_string& operator=(basic_string&& __str) {swap(__str); return *this;} #endif _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s) {return assign(__s);} @@ -1521,7 +1521,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st __init(__str.__get_long_pointer(), __str.__get_long_size()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _LIBCPP_INLINE_VISIBILITY inline @@ -1545,7 +1545,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, co #endif } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -3423,7 +3423,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs) return __r; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _LIBCPP_INLINE_VISIBILITY inline @@ -3483,7 +3483,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs) return _STD::move(__lhs); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES // swap diff --git a/include/strstream b/include/strstream index 54a3b6e49..5716eca83 100644 --- a/include/strstream +++ b/include/strstream @@ -149,10 +149,10 @@ public: strstreambuf(unsigned char* __gnext, streamsize __n, unsigned char* __pbeg = 0); strstreambuf(const unsigned char* __gnext, streamsize __n); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES strstreambuf(strstreambuf&& __rhs); strstreambuf& operator=(strstreambuf&& __rhs); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES virtual ~strstreambuf(); @@ -200,7 +200,7 @@ public: istrstream(char* __s, streamsize __n) : istream(&__sb_), __sb_(__s, __n) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES istrstream(istrstream&& __rhs) : istream(_STD::move(__rhs)), __sb_(_STD::move(__rhs.__sb_)) @@ -214,7 +214,7 @@ public: __sb_ = _STD::move(__rhs.__sb_); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES virtual ~istrstream(); @@ -242,7 +242,7 @@ public: __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES ostrstream(ostrstream&& __rhs) : ostream(_STD::move(__rhs)), __sb_(_STD::move(__rhs.__sb_)) @@ -256,7 +256,7 @@ public: __sb_ = _STD::move(__rhs.__sb_); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES virtual ~ostrstream(); @@ -293,7 +293,7 @@ public: __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0)) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES strstream(strstream&& __rhs) : iostream(_STD::move(__rhs)), __sb_(_STD::move(__rhs.__sb_)) @@ -307,7 +307,7 @@ public: __sb_ = _STD::move(__rhs.__sb_); return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES virtual ~strstream(); diff --git a/include/thread b/include/thread index c380fe6ec..06cb5cac1 100644 --- a/include/thread +++ b/include/thread @@ -265,10 +265,10 @@ public: #endif ~thread(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES thread(thread&& __t) : __t_(__t.__t_) {__t.__t_ = 0;} thread& operator=(thread&& __t); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void swap(thread& __t) {_STD::swap(__t_, __t.__t_);} @@ -343,7 +343,7 @@ thread::thread(_F __f) #endif // _LIBCPP_HAS_NO_VARIADICS -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES inline thread& @@ -356,7 +356,7 @@ thread::operator=(thread&& __t) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES inline void swap(thread& __x, thread& __y) {__x.swap(__y);} diff --git a/include/type_traits b/include/type_traits index 6daeae55e..5cdcf12f2 100644 --- a/include/type_traits +++ b/include/type_traits @@ -246,13 +246,13 @@ template struct is_lvalue_reference : public false_type {}; template struct is_lvalue_reference<_Tp&> : public true_type {}; template struct is_rvalue_reference : public false_type {}; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct is_rvalue_reference<_Tp&&> : public true_type {}; #endif template struct is_reference : public false_type {}; template struct is_reference<_Tp&> : public true_type {}; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct is_reference<_Tp&&> : public true_type {}; #endif @@ -400,7 +400,7 @@ template struct add_cv {typedef typename add_const struct remove_reference {typedef _Tp type;}; template struct remove_reference<_Tp&> {typedef _Tp type;}; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct remove_reference<_Tp&&> {typedef _Tp type;}; #endif @@ -413,7 +413,7 @@ template <> struct add_lvalue_reference {typedef c template <> struct add_lvalue_reference {typedef volatile void type;}; template <> struct add_lvalue_reference {typedef const volatile void type;}; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct add_rvalue_reference {typedef _Tp&& type;}; template <> struct add_rvalue_reference {typedef void type;}; @@ -421,7 +421,7 @@ template <> struct add_rvalue_reference {typedef c template <> struct add_rvalue_reference {typedef volatile void type;}; template <> struct add_rvalue_reference {typedef const volatile void type;}; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES // remove_pointer @@ -515,13 +515,13 @@ template struct is_abstract : public __libcpp_abstract<_Tp> {}; namespace __is_convertible_imp { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template char __test(const volatile typename remove_reference<_Tp>::type&&); #else template char __test(_Tp); #endif template __two __test(...); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp&& __source(); #else template typename remove_reference<_Tp>::type& __source(); @@ -561,12 +561,12 @@ struct __is_convertible template struct __is_convertible<_T1, _T2, 1, 0> : false_type {}; template struct __is_convertible<_T1, const _T1&, 1, 0> : true_type {}; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct __is_convertible<_T1, _T1&&, 1, 0> : true_type {}; template struct __is_convertible<_T1, const _T1&&, 1, 0> : true_type {}; template struct __is_convertible<_T1, volatile _T1&&, 1, 0> : true_type {}; template struct __is_convertible<_T1, const volatile _T1&&, 1, 0> : true_type {}; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct __is_convertible<_T1, _T2*, 1, 0> : public integral_constant::type*, _T2*>::value> {}; @@ -581,7 +581,7 @@ template struct __is_convertible<_T1, _T2* const volatile : public integral_constant::type*, _T2*const volatile>::value> {}; template struct __is_convertible<_T1, _T2, 2, 0> : public false_type {}; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct __is_convertible<_T1, _T1&&, 2, 0> : public true_type {}; #endif template struct __is_convertible<_T1, _T1*, 2, 0> : public true_type {}; @@ -1083,13 +1083,13 @@ template struct common_type<_Tp, _Up, void> { private: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static _Tp&& __t(); static _Up&& __u(); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES static _Tp __t(); static _Up __u(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES static bool __f(); public: typedef decltype(__f() ? __t() : __u()) type; @@ -1126,7 +1126,7 @@ struct common_type<_Tp, _Up, _Vp...> // move -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -1180,7 +1180,7 @@ template ::type&& __t) = delete; -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template class __rv @@ -1264,21 +1264,21 @@ forward(const _Up& __t) return _Tp(__rv<_Tp>(__t)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename add_rvalue_reference<_Tp>::type declval(); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename add_lvalue_reference<_Tp>::type declval(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct decay diff --git a/include/unordered_map b/include/unordered_map index 7513c24c3..2dd61a506 100644 --- a/include/unordered_map +++ b/include/unordered_map @@ -375,7 +375,7 @@ public: __second_constructed(false) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __hash_map_node_destructor(__hash_node_destructor&& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), @@ -383,7 +383,7 @@ public: { __x.__value_constructed = false; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES __hash_map_node_destructor(const __hash_node_destructor& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), @@ -391,7 +391,7 @@ public: { const_cast(__x.__value_constructed) = false; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void operator()(pointer __p) { @@ -573,10 +573,10 @@ public: explicit unordered_map(const allocator_type& __a); unordered_map(const unordered_map& __u); unordered_map(const unordered_map& __u, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_map(unordered_map&& __u); unordered_map(unordered_map&& __u, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_map(initializer_list __il); unordered_map(initializer_list __il, size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); @@ -585,7 +585,7 @@ public: const allocator_type& __a); // ~unordered_map() = default; // unordered_map& operator=(const unordered_map& __u) = default; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_map& operator=(unordered_map&& __u); #endif unordered_map& operator=(initializer_list __il); @@ -604,7 +604,7 @@ public: const_iterator cbegin() const {return __table_.begin();} const_iterator cend() const {return __table_.end();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES pair emplace() {return __table_.__emplace_unique();} @@ -613,10 +613,14 @@ public: pair emplace(_A0&& __a0) {return __table_.__emplace_unique(_STD::forward<_A0>(__a0));} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> pair emplace(_A0&& __a0, _Args&&... __args); +#endif // _LIBCPP_HAS_NO_VARIADICS + iterator emplace_hint(const_iterator) {return __table_.__emplace_unique().first;} @@ -625,28 +629,31 @@ public: iterator emplace_hint(const_iterator, _A0&& __a0) {return __table_.__emplace_unique(_STD::forward<_A0>(__a0)).first;} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> iterator emplace_hint(const_iterator, _A0&& __a0, _Args&&... __args) {return emplace(_STD::forward<_A0>(__a0), _STD::forward<_Args>(__args)...).first;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES pair insert(const value_type& __x) {return __table_.__insert_unique(__x);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template ::value>::type> pair insert(_P&& __x) {return __table_.__insert_unique(_STD::forward<_P>(__x));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template ::value>::type> iterator insert(const_iterator, _P&& __x) {return insert(_STD::forward<_P>(__x)).first;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); void insert(initializer_list __il) @@ -674,7 +681,7 @@ public: {return __table_.__equal_range_unique(__k);} mapped_type& operator[](const key_type& __k); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES mapped_type& operator[](key_type&& __k); #endif @@ -702,14 +709,16 @@ public: void reserve(size_type __n) {__table_.reserve(__n);} private: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template ::value>::type> __node_holder __construct_node(_A0&& __a0, _Args&&... __args); +#endif // _LIBCPP_HAS_NO_VARIADICS template ::value>::type> __node_holder __construct_node(_A0&& __a0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES __node_holder __construct_node(const key_type& __k); #endif }; @@ -787,7 +796,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( insert(__u.begin(), __u.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -812,7 +821,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( @@ -841,7 +850,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( insert(__il.begin(), __il.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -852,7 +861,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -864,7 +873,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=( return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template template ::__construct_node(_A0&& __a0, return __h; } +#endif // _LIBCPP_HAS_NO_VARIADICS + template template ::value>::type @@ -901,6 +913,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0) return __h; } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template ::value>::type @@ -916,7 +930,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace(_A0&& __a0, _Args&&... _ return __r; } -#else // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__node_holder @@ -931,7 +946,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type& return _STD::move(__h); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template @@ -957,7 +972,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k) return __r.first->second; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp& @@ -972,7 +987,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k) return __r.first->second; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp& @@ -1104,10 +1119,10 @@ public: explicit unordered_multimap(const allocator_type& __a); unordered_multimap(const unordered_multimap& __u); unordered_multimap(const unordered_multimap& __u, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_multimap(unordered_multimap&& __u); unordered_multimap(unordered_multimap&& __u, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_multimap(initializer_list __il); unordered_multimap(initializer_list __il, size_type __n, const hasher& __hf = hasher(), @@ -1117,7 +1132,7 @@ public: const allocator_type& __a); // ~unordered_multimap() = default; // unordered_multimap& operator=(const unordered_multimap& __u) = default; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_multimap& operator=(unordered_multimap&& __u); #endif unordered_multimap& operator=(initializer_list __il); @@ -1136,7 +1151,7 @@ public: const_iterator cbegin() const {return __table_.begin();} const_iterator cend() const {return __table_.end();} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator emplace() {return __table_.__emplace_multi();} @@ -1145,10 +1160,14 @@ public: iterator emplace(_A0&& __a0) {return __table_.__emplace_multi(_STD::forward<_A0>(__a0));} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> iterator emplace(_A0&& __a0, _Args&&... __args); +#endif // _LIBCPP_HAS_NO_VARIADICS + iterator emplace_hint(const_iterator __p) {return __table_.__emplace_hint_multi(__p.__i_);} @@ -1157,25 +1176,28 @@ public: iterator emplace_hint(const_iterator __p, _A0&& __a0) {return __table_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));} +#ifndef _LIBCPP_HAS_NO_VARIADICS + template ::value>::type> iterator emplace_hint(const_iterator __p, _A0&& __a0, _Args&&... __args); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template ::value>::type> iterator insert(_P&& __x) {return __table_.__insert_multi(_STD::forward<_P>(__x));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __p, const value_type& __x) {return __table_.__insert_multi(__p.__i_, __x);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template ::value>::type> iterator insert(const_iterator __p, _P&& __x) {return __table_.__insert_multi(__p.__i_, _STD::forward<_P>(__x));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); void insert(initializer_list __il) @@ -1223,14 +1245,14 @@ public: void reserve(size_type __n) {__table_.reserve(__n);} private: -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template ::value>::type> __node_holder __construct_node(_A0&& __a0, _Args&&... __args); template ::value>::type> __node_holder __construct_node(_A0&& __a0); -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) }; template @@ -1306,7 +1328,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( insert(__u.begin(), __u.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -1333,7 +1355,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( @@ -1362,7 +1384,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( insert(__il.begin(), __il.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -1373,7 +1395,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multima return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -1385,7 +1407,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=( return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_VARIADICS template template ::__construct_node( return __h; } +#endif // _LIBCPP_HAS_NO_VARIADICS + template template ::value>::type @@ -1422,6 +1447,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0 return __h; } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template ::value>::type @@ -1451,7 +1478,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace_hint( return __r; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template template diff --git a/include/unordered_set b/include/unordered_set index 0e827753f..d677e8b73 100644 --- a/include/unordered_set +++ b/include/unordered_set @@ -317,10 +317,10 @@ public: explicit unordered_set(const allocator_type& __a); unordered_set(const unordered_set& __u); unordered_set(const unordered_set& __u, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_set(unordered_set&& __u); unordered_set(unordered_set&& __u, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_set(initializer_list __il); unordered_set(initializer_list __il, size_type __n, const hasher& __hf = hasher(), @@ -330,7 +330,7 @@ public: const allocator_type& __a); // ~unordered_set() = default; // unordered_set& operator=(const unordered_set& __u) = default; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_set& operator=(unordered_set&& __u); #endif unordered_set& operator=(initializer_list __il); @@ -349,26 +349,26 @@ public: const_iterator cbegin() const {return __table_.begin();} const_iterator cend() const {return __table_.end();} -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template pair emplace(_Args&&... __args) {return __table_.__emplace_unique(_STD::forward<_Args>(__args)...);} template iterator emplace_hint(const_iterator, _Args&&... __args) {return __table_.__emplace_unique(_STD::forward<_Args>(__args)...).first;} -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) pair insert(const value_type& __x) {return __table_.__insert_unique(__x);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES pair insert(value_type&& __x) {return __table_.__insert_unique(_STD::move(__x));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator, value_type&& __x) {return insert(_STD::move(__x)).first;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); void insert(initializer_list __il) @@ -485,7 +485,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( insert(__u.begin(), __u.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -508,7 +508,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( @@ -537,7 +537,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( insert(__il.begin(), __il.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -548,7 +548,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -656,10 +656,10 @@ public: explicit unordered_multiset(const allocator_type& __a); unordered_multiset(const unordered_multiset& __u); unordered_multiset(const unordered_multiset& __u, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_multiset(unordered_multiset&& __u); unordered_multiset(unordered_multiset&& __u, const allocator_type& __a); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_multiset(initializer_list __il); unordered_multiset(initializer_list __il, size_type __n, const hasher& __hf = hasher(), @@ -669,7 +669,7 @@ public: const allocator_type& __a); // ~unordered_multiset() = default; // unordered_multiset& operator=(const unordered_multiset& __u) = default; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_multiset& operator=(unordered_multiset&& __u); #endif unordered_multiset& operator=(initializer_list __il); @@ -688,24 +688,24 @@ public: const_iterator cbegin() const {return __table_.begin();} const_iterator cend() const {return __table_.end();} -#ifdef _LIBCPP_MOVE +#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) template iterator emplace(_Args&&... __args) {return __table_.__emplace_multi(_STD::forward<_Args>(__args)...);} template iterator emplace_hint(const_iterator __p, _Args&&... __args) {return __table_.__emplace_hint_multi(__p, _STD::forward<_Args>(__args)...);} -#endif // _LIBCPP_MOVE +#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(value_type&& __x) {return __table_.__insert_multi(_STD::move(__x));} #endif iterator insert(const_iterator __p, const value_type& __x) {return __table_.__insert_multi(__p, __x);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __p, value_type&& __x) {return __table_.__insert_multi(__p, _STD::move(__x));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); void insert(initializer_list __il) @@ -823,7 +823,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( insert(__u.begin(), __u.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -846,7 +846,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( @@ -875,7 +875,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( insert(__il.begin(), __il.end()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline @@ -887,7 +887,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=( return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline diff --git a/include/utility b/include/utility index 0aa66e6c2..ccf20a773 100644 --- a/include/utility +++ b/include/utility @@ -171,14 +171,14 @@ swap(_Tp (&__a)[_N], _Tp (&__b)[_N]) template inline _LIBCPP_INLINE_VISIBILITY -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typename conditional < !has_nothrow_move_constructor<_Tp>::value && has_copy_constructor<_Tp>::value, const _Tp&, _Tp&& >::type -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES const _Tp& #endif move_if_noexcept(_Tp& __x) @@ -207,7 +207,7 @@ struct pair _LIBCPP_INLINE_VISIBILITY pair(const _T1& __x, const _T2& __y) : first(__x), second(__y) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template ::value && @@ -253,11 +253,11 @@ struct pair #endif // _LIBCPP_HAS_NO_VARIADICS -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template _LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void _LIBCPP_INLINE_VISIBILITY swap(pair& __p) {_STD::swap(*this, __p);} private: @@ -326,7 +326,7 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) swap(__x.second, __y.second); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template class reference_wrapper; @@ -357,7 +357,7 @@ make_pair(_T1&& __t1, _T2&& __t2) (_STD::forward<_T1>(__t1), _STD::forward<_T2>(__t2)); } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_INLINE_VISIBILITY @@ -367,7 +367,7 @@ make_pair(_T1 __x, _T2 __y) return pair<_T1, _T2>(__x, __y); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS diff --git a/include/valarray b/include/valarray index 1fcee5c46..2cac7331e 100644 --- a/include/valarray +++ b/include/valarray @@ -795,10 +795,10 @@ public: valarray(const value_type& __x, size_t __n); valarray(const value_type* __p, size_t __n); valarray(const valarray& __v); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray(valarray&& __v); valarray(initializer_list __il); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray(const slice_array& __sa); valarray(const gslice_array& __ga); valarray(const mask_array& __ma); @@ -807,10 +807,10 @@ public: // assignment: valarray& operator=(const valarray& __v); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray& operator=(valarray&& __v); valarray& operator=(initializer_list); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray& operator=(const value_type& __x); valarray& operator=(const slice_array& __sa); valarray& operator=(const gslice_array& __ga); @@ -829,22 +829,22 @@ public: slice_array operator[](slice __s); __val_expr<__indirect_expr > operator[](const gslice& __gs) const; gslice_array operator[](const gslice& __gs); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __val_expr<__indirect_expr > operator[](gslice&& __gs) const; gslice_array operator[](gslice&& __gs); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES __val_expr<__mask_expr > operator[](const valarray& __vb) const; mask_array operator[](const valarray& __vb); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __val_expr<__mask_expr > operator[](valarray&& __vb) const; mask_array operator[](valarray&& __vb); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES __val_expr<__indirect_expr > operator[](const valarray& __vs) const; indirect_array operator[](const valarray& __vs); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __val_expr<__indirect_expr > operator[](valarray&& __vs) const; indirect_array operator[](valarray&& __vs); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES // unary operators: valarray operator+() const; @@ -1395,7 +1395,7 @@ public: __stride_(__stride) {__init(__start);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_ALWAYS_INLINE gslice(size_t __start, const valarray& __size, @@ -1418,7 +1418,7 @@ public: __stride_(move(__stride)) {__init(__start);} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES // gslice(const gslice&) = default; // gslice(gslice&&) = default; @@ -1559,7 +1559,7 @@ private: __1d_(__gs.__1d_) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_ALWAYS_INLINE gslice_array(gslice&& __gs, const valarray& __v) @@ -1567,7 +1567,7 @@ private: __1d_(move(__gs.__1d_)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template friend class valarray; }; @@ -2232,7 +2232,7 @@ private: __1d_(__ia) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_ALWAYS_INLINE indirect_array(valarray&& __ia, const valarray& __v) @@ -2240,7 +2240,7 @@ private: __1d_(move(__ia)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template friend class valarray; }; @@ -2450,14 +2450,14 @@ private: __1d_(__ia) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __indirect_expr(valarray&& __ia, const _RmExpr& __e) : __expr_(__e), __1d_(move(__ia)) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: _LIBCPP_ALWAYS_INLINE @@ -2691,7 +2691,7 @@ valarray<_Tp>::valarray(const valarray& __v) } } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -2728,7 +2728,7 @@ valarray<_Tp>::valarray(initializer_list __il) } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template valarray<_Tp>::valarray(const slice_array& __sa) @@ -2863,7 +2863,7 @@ valarray<_Tp>::operator=(const valarray& __v) return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -2889,7 +2889,7 @@ valarray<_Tp>::operator=(initializer_list __il) return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -2986,7 +2986,7 @@ valarray<_Tp>::operator[](const gslice& __gs) return gslice_array(__gs, *this); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -3004,7 +3004,7 @@ valarray<_Tp>::operator[](gslice&& __gs) return gslice_array(move(__gs), *this); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -3022,7 +3022,7 @@ valarray<_Tp>::operator[](const valarray& __vb) return mask_array(__vb, *this); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -3040,7 +3040,7 @@ valarray<_Tp>::operator[](valarray&& __vb) return mask_array(move(__vb), *this); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -3058,7 +3058,7 @@ valarray<_Tp>::operator[](const valarray& __vs) return indirect_array(__vs, *this); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template inline _LIBCPP_ALWAYS_INLINE @@ -3076,7 +3076,7 @@ valarray<_Tp>::operator[](valarray&& __vs) return indirect_array(move(__vs), *this); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template valarray<_Tp> diff --git a/include/vector b/include/vector index 9e792c884..7441cd01a 100644 --- a/include/vector +++ b/include/vector @@ -484,11 +484,11 @@ public: vector(const vector& __x); vector(const vector& __x, const allocator_type& __a); vector& operator=(const vector& __x); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES vector(vector&& __x); vector(vector&& __x, const allocator_type& __a); vector& operator=(vector&& __x); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES vector& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} @@ -552,19 +552,23 @@ public: {return _STD::__to_raw_pointer(this->__begin_);} void push_back(const_reference __x); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void push_back(value_type&& __x); +#ifndef _LIBCPP_HAS_NO_VARIADICS template void emplace_back(_Args&&... __args); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void pop_back(); iterator insert(const_iterator __position, const_reference __x); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __position, value_type&& __x); +#ifndef _LIBCPP_HAS_NO_VARIADICS template iterator emplace(const_iterator __position, _Args&&... __args); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES iterator insert(const_iterator __position, size_type __n, const_reference __x); template typename enable_if @@ -951,7 +955,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a) } } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _LIBCPP_INLINE_VISIBILITY inline @@ -1043,7 +1047,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type) __c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template _LIBCPP_INLINE_VISIBILITY inline @@ -1283,7 +1287,7 @@ vector<_Tp, _Allocator>::push_back(const_reference __x) } } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -1305,6 +1309,8 @@ vector<_Tp, _Allocator>::push_back(value_type&& __x) } } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template void @@ -1326,7 +1332,8 @@ vector<_Tp, _Allocator>::emplace_back(_Args&&... __args) } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template _LIBCPP_INLINE_VISIBILITY inline @@ -1402,7 +1409,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x) return __make_iter(__p); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename vector<_Tp, _Allocator>::iterator @@ -1434,6 +1441,8 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x) return __make_iter(__p); } +#ifndef _LIBCPP_HAS_NO_VARIADICS + template template typename vector<_Tp, _Allocator>::iterator @@ -1465,7 +1474,8 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) return __make_iter(__p); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template typename vector<_Tp, _Allocator>::iterator @@ -1761,11 +1771,11 @@ public: vector(initializer_list __il); vector(initializer_list __il, const allocator_type& __a); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES vector(vector&& __v); vector(vector&& __v, const allocator_type& __a); vector& operator=(vector&& __v); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES vector& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} @@ -2272,7 +2282,8 @@ vector::operator=(const vector& __v) return *this; } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES + template _LIBCPP_INLINE_VISIBILITY inline vector::vector(vector&& __v) @@ -2337,7 +2348,8 @@ vector::__move_assign(vector& __c, true_type) __c.__begin_ = nullptr; __c.__cap() = __c.__size_ = 0; } -#endif // _LIBCPP_MOVE + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void diff --git a/src/strstream.cpp b/src/strstream.cpp index f06c2a229..b93577f93 100644 --- a/src/strstream.cpp +++ b/src/strstream.cpp @@ -100,7 +100,7 @@ strstreambuf::strstreambuf(const unsigned char* __gnext, streamsize __n) __init((char*)__gnext, __n, nullptr); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES strstreambuf::strstreambuf(strstreambuf&& __rhs) : streambuf(__rhs), @@ -132,7 +132,7 @@ strstreambuf::operator=(strstreambuf&& __rhs) __rhs.setp(nullptr, nullptr); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES strstreambuf::~strstreambuf() { diff --git a/test/algorithms/alg.modifying.operations/alg.move/move.pass.cpp b/test/algorithms/alg.modifying.operations/alg.move/move.pass.cpp index 80c50abe4..a6f12cffa 100644 --- a/test/algorithms/alg.modifying.operations/alg.move/move.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.move/move.pass.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -38,7 +38,7 @@ test() assert(ia[i] == ib[i]); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -56,7 +56,7 @@ test1() assert(*ib[i] == i); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -95,7 +95,7 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1*>, output_iterator*> >(); test1*>, input_iterator*> >(); test1*>, forward_iterator*> >(); @@ -130,5 +130,5 @@ int main() test1*, bidirectional_iterator*> >(); test1*, random_access_iterator*> >(); test1*, std::unique_ptr*>(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp b/test/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp index 349f13eb7..42fdc9d1f 100644 --- a/test/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -38,7 +38,7 @@ test() assert(ia[i] == ib[i]); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -56,7 +56,7 @@ test1() assert(*ib[i] == i); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -72,7 +72,7 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1*>, bidirectional_iterator*> >(); test1*>, random_access_iterator*> >(); test1*>, std::unique_ptr*>(); @@ -84,5 +84,5 @@ int main() test1*, bidirectional_iterator*> >(); test1*, random_access_iterator*> >(); test1*, std::unique_ptr*>(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp b/test/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp index 9e7c14b61..02e407376 100644 --- a/test/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif diff --git a/test/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp b/test/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp index bdb579ecd..fe219a312 100644 --- a/test/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -283,7 +283,7 @@ test() } } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct is_null { @@ -300,7 +300,7 @@ test1() Iter r = std::stable_partition(Iter(array), Iter(array+size), is_null()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -308,7 +308,7 @@ int main() test*> >(); test*>(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1*> >(); #endif } diff --git a/test/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp b/test/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp index 44ef8e369..89121cb2d 100644 --- a/test/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -39,7 +39,7 @@ test() assert(ia[5] == 4); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -63,7 +63,7 @@ test1() assert(*ia[5] == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -72,12 +72,12 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1*> >(); test1*> >(); test1*> >(); test1*>(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp b/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp index df8996c23..1011a6a10 100644 --- a/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp @@ -18,7 +18,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -40,7 +40,7 @@ test() assert(ia[5] == 4); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct pred { @@ -72,7 +72,7 @@ test1() assert(*ia[5] == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -81,12 +81,12 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1*> >(); test1*> >(); test1*> >(); test1*>(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp b/test/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp index 91164113c..d37fb9419 100644 --- a/test/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp @@ -15,7 +15,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -213,7 +213,7 @@ test() assert(ig[5] == 2); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -419,7 +419,7 @@ test1() assert(*ig[5] == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -428,12 +428,12 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1*> >(); test1*> >(); test1*> >(); test1*>(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp b/test/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp index f150d2f8d..4076dfc55 100644 --- a/test/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -38,7 +38,7 @@ test() assert(j[2] == 3); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -60,7 +60,7 @@ test1() assert(*j[2] == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -84,7 +84,7 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1*>, forward_iterator*> >(); test1*>, bidirectional_iterator*> >(); @@ -106,5 +106,5 @@ int main() test1*, random_access_iterator*> >(); test1*, std::unique_ptr*>(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp b/test/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp index f31c73ff0..f4bbc131f 100644 --- a/test/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -84,7 +84,7 @@ test() assert(ii[2] == 2); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct do_nothing { @@ -169,7 +169,7 @@ test1() assert(*ii[2] == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -178,12 +178,12 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1 >(); test1 >(); test1 >(); test1(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp b/test/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp index 0b921e02c..a4ae57c3f 100644 --- a/test/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp +++ b/test/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -110,7 +110,7 @@ test() assert(count_equal::count == si-1); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct do_nothing { @@ -211,7 +211,7 @@ test1() assert(count_equal::count == si-1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -220,12 +220,12 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1 >(); test1 >(); test1 >(); test1(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp b/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp index 70b1b8154..1b9d6c0ab 100644 --- a/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp @@ -17,7 +17,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -27,7 +27,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void test(unsigned N) { @@ -49,7 +49,7 @@ int main() test(10); test(1000); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { const int N = 1000; std::unique_ptr* ia = new std::unique_ptr [N]; @@ -60,5 +60,5 @@ int main() assert(std::is_heap(ia, ia+N, indirect_less())); delete [] ia; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp b/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp index cc093a540..aeae64f25 100644 --- a/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp @@ -17,7 +17,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -27,7 +27,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void test(unsigned N) { @@ -49,7 +49,7 @@ int main() { test(1000); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { const int N = 1000; std::unique_ptr* ia = new std::unique_ptr [N]; @@ -64,5 +64,5 @@ int main() } delete [] ia; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp b/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp index 87126298b..132fc6009 100644 --- a/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp @@ -18,7 +18,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -28,7 +28,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void test(unsigned N) { @@ -48,7 +48,7 @@ int main() { test(1000); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { const int N = 1000; std::unique_ptr* ia = new std::unique_ptr [N]; @@ -62,5 +62,5 @@ int main() } delete [] ia; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp b/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp index 8cac3b6cd..e451e68b7 100644 --- a/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp @@ -17,7 +17,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -27,7 +27,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void test(unsigned N) { @@ -50,7 +50,7 @@ int main() test(10); test(1000); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { const int N = 1000; std::unique_ptr* ia = new std::unique_ptr [N]; @@ -62,5 +62,5 @@ int main() assert(std::is_sorted(ia, ia+N, indirect_less())); delete [] ia; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp index 56f46287b..1ee72885e 100644 --- a/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp @@ -18,7 +18,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -28,7 +28,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #include "../../iterators.h" @@ -89,7 +89,7 @@ int main() test >(); test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { unsigned N = 100; unsigned M = 50; @@ -108,5 +108,5 @@ int main() } delete [] ia; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp index d79ddde58..9d274357c 100644 --- a/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int i = std::max({2, 3, 1}); assert(i == 3); i = std::max({2, 1, 3}); @@ -31,5 +31,5 @@ int main() assert(i == 3); i = std::max({1, 3, 2}); assert(i == 3); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp index c31a9f8dc..e15a107ca 100644 --- a/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int i = std::max({2, 3, 1}, std::greater()); assert(i == 1); i = std::max({2, 1, 3}, std::greater()); @@ -32,5 +32,5 @@ int main() assert(i == 1); i = std::max({1, 3, 2}, std::greater()); assert(i == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp index 62c42064e..e281ba11c 100644 --- a/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int i = std::min({2, 3, 1}); assert(i == 1); i = std::min({2, 1, 3}); @@ -31,5 +31,5 @@ int main() assert(i == 1); i = std::min({1, 3, 2}); assert(i == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp index 2b9499ba8..729b4f5f9 100644 --- a/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int i = std::min({2, 3, 1}, std::greater()); assert(i == 3); i = std::min({2, 1, 3}, std::greater()); @@ -32,5 +32,5 @@ int main() assert(i == 3); i = std::min({1, 3, 2}, std::greater()); assert(i == 3); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp index cf028de1f..6d776a0f9 100644 --- a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp @@ -18,12 +18,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert((std::minmax({1, 2, 3}) == std::pair(1, 3))); assert((std::minmax({1, 3, 2}) == std::pair(1, 3))); assert((std::minmax({2, 1, 3}) == std::pair(1, 3))); assert((std::minmax({2, 3, 1}) == std::pair(1, 3))); assert((std::minmax({3, 1, 2}) == std::pair(1, 3))); assert((std::minmax({3, 2, 1}) == std::pair(1, 3))); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp index d233c2525..606a97042 100644 --- a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp @@ -19,12 +19,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert((std::minmax({1, 2, 3}, std::greater()) == std::pair(3, 1))); assert((std::minmax({1, 3, 2}, std::greater()) == std::pair(3, 1))); assert((std::minmax({2, 1, 3}, std::greater()) == std::pair(3, 1))); assert((std::minmax({2, 3, 1}, std::greater()) == std::pair(3, 1))); assert((std::minmax({3, 1, 2}, std::greater()) == std::pair(3, 1))); assert((std::minmax({3, 2, 1}, std::greater()) == std::pair(3, 1))); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp b/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp index 5e89a03fe..dd31b4578 100644 --- a/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp @@ -19,7 +19,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -29,7 +29,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void test_one(unsigned N, unsigned M) @@ -73,7 +73,7 @@ int main() test(1000); test(1009); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > v(1000); for (int i = 0; i < v.size(); ++i) @@ -81,5 +81,5 @@ int main() std::nth_element(v.begin(), v.begin() + v.size()/2, v.end(), indirect_less()); assert(*v[v.size()/2] == v.size()/2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp b/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp index d9e8e5f96..433bc6631 100644 --- a/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp @@ -19,7 +19,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -29,7 +29,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void test_larger_sorts(unsigned N, unsigned M) @@ -74,7 +74,7 @@ int main() test_larger_sorts(1000); test_larger_sorts(1009); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > v(1000); for (int i = 0; i < v.size(); ++i) @@ -83,5 +83,5 @@ int main() for (int i = 0; i < v.size()/2; ++i) assert(*v[i] == i); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp b/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp index 46f1abbbd..02349fe71 100644 --- a/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp @@ -19,7 +19,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -29,7 +29,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { @@ -42,7 +42,7 @@ int main() assert(std::is_sorted(v.begin(), v.end())); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > v(1000); for (int i = 0; i < v.size(); ++i) @@ -53,5 +53,5 @@ int main() assert(*v[1] == 1); assert(*v[2] == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp b/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp index 6b57c2d4b..3c439741d 100644 --- a/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp @@ -19,7 +19,7 @@ #include #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include struct indirect_less @@ -29,7 +29,7 @@ struct indirect_less {return *x < *y;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES struct first_only { @@ -68,7 +68,7 @@ int main() { test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > v(1000); for (int i = 0; i < v.size(); ++i) @@ -79,5 +79,5 @@ int main() assert(*v[1] == 1); assert(*v[2] == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/Emplaceable.h b/test/containers/Emplaceable.h index 5d457bbac..59ccc6683 100644 --- a/test/containers/Emplaceable.h +++ b/test/containers/Emplaceable.h @@ -1,7 +1,7 @@ #ifndef EMPLACEABLE_H #define EMPLACEABLE_H -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES class Emplaceable { @@ -40,6 +40,6 @@ struct hash } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif // EMPLACEABLE_H diff --git a/test/containers/MoveOnly.h b/test/containers/MoveOnly.h index c3468387e..cbf80201a 100644 --- a/test/containers/MoveOnly.h +++ b/test/containers/MoveOnly.h @@ -1,7 +1,7 @@ #ifndef MOVEONLY_H #define MOVEONLY_H -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #include @@ -36,6 +36,6 @@ struct hash } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif // MOVEONLY_H diff --git a/test/containers/associative/map/map.access/index_rv_key.pass.cpp b/test/containers/associative/map/map.access/index_rv_key.pass.cpp index ade5b9bf8..8ede5d2cc 100644 --- a/test/containers/associative/map/map.access/index_rv_key.pass.cpp +++ b/test/containers/associative/map/map.access/index_rv_key.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; std::map m; assert(m.size() == 0); @@ -34,5 +34,5 @@ int main() m[6] = 6.5; assert(m[6] == 6.5); assert(m.size() == 2); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp index 3a5ffa73d..df79f2f1a 100644 --- a/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; std::map m = { @@ -41,5 +41,5 @@ int main() assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.cons/initializer_list.pass.cpp b/test/containers/associative/map/map.cons/initializer_list.pass.cpp index 02ae034a1..cc0964f8c 100644 --- a/test/containers/associative/map/map.cons/initializer_list.pass.cpp +++ b/test/containers/associative/map/map.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; std::map m = { @@ -37,5 +37,5 @@ int main() assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp b/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp index d47fb41ab..6c8987ecf 100644 --- a/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; typedef test_compare > C; std::map m({ @@ -39,5 +39,5 @@ int main() assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); assert(m.key_comp() == C(3)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp index 221b25185..e95ee1d53 100644 --- a/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; typedef test_compare > C; typedef test_allocator > A; @@ -42,5 +42,5 @@ int main() assert(*next(m.begin(), 2) == V(3, 1)); assert(m.key_comp() == C(3)); assert(m.get_allocator() == A(6)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.cons/move.pass.cpp b/test/containers/associative/map/map.cons/move.pass.cpp index a36bba4eb..5780adaac 100644 --- a/test/containers/associative/map/map.cons/move.pass.cpp +++ b/test/containers/associative/map/map.cons/move.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; { typedef test_compare > C; @@ -68,5 +68,5 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.cons/move_alloc.pass.cpp b/test/containers/associative/map/map.cons/move_alloc.pass.cpp index 4ecc434a6..296d3b7ef 100644 --- a/test/containers/associative/map/map.cons/move_alloc.pass.cpp +++ b/test/containers/associative/map/map.cons/move_alloc.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair V; typedef std::pair VC; @@ -140,5 +140,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.cons/move_assign.pass.cpp b/test/containers/associative/map/map.cons/move_assign.pass.cpp index 498c4fa4a..28a8e6e25 100644 --- a/test/containers/associative/map/map.cons/move_assign.pass.cpp +++ b/test/containers/associative/map/map.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair V; typedef std::pair VC; @@ -143,5 +143,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.modifiers/emplace.pass.cpp b/test/containers/associative/map/map.modifiers/emplace.pass.cpp index 258b87f0c..fb27f4c56 100644 --- a/test/containers/associative/map/map.modifiers/emplace.pass.cpp +++ b/test/containers/associative/map/map.modifiers/emplace.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::map M; typedef std::pair R; @@ -85,5 +85,5 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.modifiers/emplace_hint.pass.cpp b/test/containers/associative/map/map.modifiers/emplace_hint.pass.cpp index d4e3676d4..1148a5573 100644 --- a/test/containers/associative/map/map.modifiers/emplace_hint.pass.cpp +++ b/test/containers/associative/map/map.modifiers/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::map M; typedef M::iterator R; @@ -78,5 +78,5 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp b/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp index ec1b80b30..1e7b1be03 100644 --- a/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp +++ b/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; std::map m = { @@ -39,5 +39,5 @@ int main() assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp b/test/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp index 6e066c5b4..fc466b142 100644 --- a/test/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp +++ b/test/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::map M; typedef std::pair P; @@ -51,5 +51,5 @@ int main() assert(r->first == 3); assert(r->second == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/map/map.modifiers/insert_rv.pass.cpp b/test/containers/associative/map/map.modifiers/insert_rv.pass.cpp index b4a4ee0bf..b19adb23c 100644 --- a/test/containers/associative/map/map.modifiers/insert_rv.pass.cpp +++ b/test/containers/associative/map/map.modifiers/insert_rv.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::map M; typedef std::pair R; @@ -54,5 +54,5 @@ int main() assert(r.first->first == 3); assert(r.first->second == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp b/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp index 948c689f4..6762913c7 100644 --- a/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::multimap C; typedef C::value_type V; C m = {{20, 1}}; @@ -46,5 +46,5 @@ int main() assert(*++i == V(3, 1)); assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp b/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp index 862487bda..06dccdb1f 100644 --- a/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::multimap C; typedef C::value_type V; C m = @@ -45,5 +45,5 @@ int main() assert(*++i == V(3, 1)); assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp b/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp index 542697f2c..0b6309bc4 100644 --- a/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_compare > Cmp; typedef std::multimap C; typedef C::value_type V; @@ -50,5 +50,5 @@ int main() assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); assert(m.key_comp() == Cmp(4)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp index 24bf9758c..a18c4e69a 100644 --- a/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_compare > Cmp; typedef test_allocator > A; typedef std::multimap C; @@ -53,5 +53,5 @@ int main() assert(*++i == V(3, 2)); assert(m.key_comp() == Cmp(4)); assert(m.get_allocator() == A(5)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.cons/move.pass.cpp b/test/containers/associative/multimap/multimap.cons/move.pass.cpp index 3272212e2..3d6692bba 100644 --- a/test/containers/associative/multimap/multimap.cons/move.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/move.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::pair V; { typedef test_compare > C; @@ -74,5 +74,5 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp b/test/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp index b22debaba..60a828322 100644 --- a/test/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair V; typedef std::pair VC; @@ -140,5 +140,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.cons/move_assign.pass.cpp b/test/containers/associative/multimap/multimap.cons/move_assign.pass.cpp index a7dccd3ff..42d3afeba 100644 --- a/test/containers/associative/multimap/multimap.cons/move_assign.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair V; typedef std::pair VC; @@ -143,5 +143,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp b/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp index 811f1bf26..12c1e283d 100644 --- a/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp +++ b/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multimap M; typedef M::iterator R; @@ -78,5 +78,5 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp b/test/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp index c7d5895a3..daff2f7aa 100644 --- a/test/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp +++ b/test/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multimap M; typedef M::iterator R; @@ -78,5 +78,5 @@ int main() assert(m.begin()->first == 2); assert(m.begin()->second == 3.5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp b/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp index 93aab71ae..15093a3bb 100644 --- a/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp +++ b/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::multimap C; typedef C::value_type V; C m = @@ -49,5 +49,5 @@ int main() assert(*++i == V(3, 1)); assert(*++i == V(3, 2)); assert(*++i == V(3, 1.5)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp b/test/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp index 311ce01c2..29831153a 100644 --- a/test/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp +++ b/test/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multimap M; typedef std::pair P; @@ -51,5 +51,5 @@ int main() assert(r->first == 3); assert(r->second == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp b/test/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp index 5b39998d3..48843e169 100644 --- a/test/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp +++ b/test/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multimap M; typedef M::iterator R; @@ -50,5 +50,5 @@ int main() assert(r->first == 3); assert(r->second == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/emplace.pass.cpp b/test/containers/associative/multiset/emplace.pass.cpp index df2d65690..790d91cee 100644 --- a/test/containers/associative/multiset/emplace.pass.cpp +++ b/test/containers/associative/multiset/emplace.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multiset M; typedef M::iterator R; @@ -67,5 +67,5 @@ int main() assert(m.size() == 1); assert(*r == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/emplace_hint.pass.cpp b/test/containers/associative/multiset/emplace_hint.pass.cpp index 44806984c..148a61637 100644 --- a/test/containers/associative/multiset/emplace_hint.pass.cpp +++ b/test/containers/associative/multiset/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multiset M; typedef M::iterator R; @@ -67,5 +67,5 @@ int main() assert(m.size() == 1); assert(*r == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/insert_initializer_list.pass.cpp b/test/containers/associative/multiset/insert_initializer_list.pass.cpp index b7c1f2d55..7772c40c1 100644 --- a/test/containers/associative/multiset/insert_initializer_list.pass.cpp +++ b/test/containers/associative/multiset/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::multiset C; typedef C::value_type V; C m = {10, 8}; @@ -34,5 +34,5 @@ int main() assert(*++i == V(6)); assert(*++i == V(8)); assert(*++i == V(10)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/insert_iter_rv.pass.cpp b/test/containers/associative/multiset/insert_iter_rv.pass.cpp index dde5c002e..955e1ddb8 100644 --- a/test/containers/associative/multiset/insert_iter_rv.pass.cpp +++ b/test/containers/associative/multiset/insert_iter_rv.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multiset M; typedef M::iterator R; @@ -45,5 +45,5 @@ int main() assert(m.size() == 4); assert(*r == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/insert_rv.pass.cpp b/test/containers/associative/multiset/insert_rv.pass.cpp index 19e61191b..024689d65 100644 --- a/test/containers/associative/multiset/insert_rv.pass.cpp +++ b/test/containers/associative/multiset/insert_rv.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::multiset M; typedef M::iterator R; @@ -45,5 +45,5 @@ int main() assert(m.size() == 4); assert(*r == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp b/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp index 2420126eb..974d3fa09 100644 --- a/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::multiset C; typedef C::value_type V; C m = {10, 8}; @@ -32,5 +32,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp b/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp index 9f51ad6fc..78f59fd2e 100644 --- a/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::multiset C; typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; @@ -31,5 +31,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp b/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp index b737d278b..e7d108136 100644 --- a/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_compare > Cmp; typedef std::multiset C; typedef C::value_type V; @@ -34,5 +34,5 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp index b85179374..eda6d1c5a 100644 --- a/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_compare > Cmp; typedef test_allocator A; typedef std::multiset C; @@ -37,5 +37,5 @@ int main() assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); assert(m.get_allocator() == A(4)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/multiset.cons/move.pass.cpp b/test/containers/associative/multiset/multiset.cons/move.pass.cpp index e392733c9..519020150 100644 --- a/test/containers/associative/multiset/multiset.cons/move.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/move.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int V; typedef test_compare > C; @@ -75,5 +75,5 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp b/test/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp index 9043047ef..1f19e0279 100644 --- a/test/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly V; typedef test_compare > C; @@ -137,5 +137,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/multiset/multiset.cons/move_assign.pass.cpp b/test/containers/associative/multiset/multiset.cons/move_assign.pass.cpp index 778a11397..ddc170207 100644 --- a/test/containers/associative/multiset/multiset.cons/move_assign.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly V; typedef test_compare > C; @@ -140,5 +140,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/emplace.pass.cpp b/test/containers/associative/set/emplace.pass.cpp index 2082d5410..6b0a5d28f 100644 --- a/test/containers/associative/set/emplace.pass.cpp +++ b/test/containers/associative/set/emplace.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::set M; typedef std::pair R; @@ -73,5 +73,5 @@ int main() assert(m.size() == 1); assert(*r.first == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/emplace_hint.pass.cpp b/test/containers/associative/set/emplace_hint.pass.cpp index faa7e1d7d..be21ee210 100644 --- a/test/containers/associative/set/emplace_hint.pass.cpp +++ b/test/containers/associative/set/emplace_hint.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::set M; typedef M::iterator R; @@ -67,5 +67,5 @@ int main() assert(m.size() == 1); assert(*r == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/insert_initializer_list.pass.cpp b/test/containers/associative/set/insert_initializer_list.pass.cpp index 5cc6a6941..73ea5e37f 100644 --- a/test/containers/associative/set/insert_initializer_list.pass.cpp +++ b/test/containers/associative/set/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::set C; typedef C::value_type V; C m = {10, 8}; @@ -34,5 +34,5 @@ int main() assert(*++i == V(6)); assert(*++i == V(8)); assert(*++i == V(10)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/insert_iter_rv.pass.cpp b/test/containers/associative/set/insert_iter_rv.pass.cpp index 16161787a..1e8b9b3ac 100644 --- a/test/containers/associative/set/insert_iter_rv.pass.cpp +++ b/test/containers/associative/set/insert_iter_rv.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::set M; typedef M::iterator R; @@ -45,5 +45,5 @@ int main() assert(m.size() == 3); assert(*r == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/insert_rv.pass.cpp b/test/containers/associative/set/insert_rv.pass.cpp index d4fa699aa..71365837f 100644 --- a/test/containers/associative/set/insert_rv.pass.cpp +++ b/test/containers/associative/set/insert_rv.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::set M; typedef std::pair R; @@ -49,5 +49,5 @@ int main() assert(m.size() == 3); assert(*r.first == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp b/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp index 49c9b843f..167e8bc14 100644 --- a/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::set C; typedef C::value_type V; C m = {10, 8}; @@ -32,5 +32,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/set.cons/initializer_list.pass.cpp b/test/containers/associative/set/set.cons/initializer_list.pass.cpp index 8fef24b18..4bfa8f60a 100644 --- a/test/containers/associative/set/set.cons/initializer_list.pass.cpp +++ b/test/containers/associative/set/set.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::set C; typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; @@ -31,5 +31,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp b/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp index 65f539d32..e24a930b7 100644 --- a/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_compare > Cmp; typedef std::set C; typedef C::value_type V; @@ -34,5 +34,5 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp index 418c551f4..7ea728dc6 100644 --- a/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_compare > Cmp; typedef test_allocator A; typedef std::set C; @@ -37,5 +37,5 @@ int main() assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); assert(m.get_allocator() == A(4)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/set.cons/move.pass.cpp b/test/containers/associative/set/set.cons/move.pass.cpp index df46c5d62..eb0dd4a59 100644 --- a/test/containers/associative/set/set.cons/move.pass.cpp +++ b/test/containers/associative/set/set.cons/move.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int V; typedef test_compare > C; @@ -69,5 +69,5 @@ int main() assert(mo.size() == 0); assert(distance(mo.begin(), mo.end()) == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/set.cons/move_alloc.pass.cpp b/test/containers/associative/set/set.cons/move_alloc.pass.cpp index 653c60fcd..ac23ce538 100644 --- a/test/containers/associative/set/set.cons/move_alloc.pass.cpp +++ b/test/containers/associative/set/set.cons/move_alloc.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly V; typedef test_compare > C; @@ -137,5 +137,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/associative/set/set.cons/move_assign.pass.cpp b/test/containers/associative/set/set.cons/move_assign.pass.cpp index e2fd21d58..0266eb935 100644 --- a/test/containers/associative/set/set.cons/move_assign.pass.cpp +++ b/test/containers/associative/set/set.cons/move_assign.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly V; typedef test_compare > C; @@ -140,5 +140,5 @@ int main() assert(m3.key_comp() == C(5)); assert(m1.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp index 149d48c3a..cc54dcc12 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp @@ -30,11 +30,11 @@ struct test : base(comp, c, a) {} test(const value_compare& comp, const container_type& c, const test_allocator& a) : base(comp, c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(const value_compare& comp, container_type&& c, const test_allocator& a) : base(comp, std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} using base::c; diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp index e0ee5cd39..b575ca0f9 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp @@ -30,11 +30,11 @@ struct test : base(comp, a) {} test(const value_compare& comp, const container_type& c, const test_allocator& a) : base(comp, c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(const value_compare& comp, container_type&& c, const test_allocator& a) : base(comp, std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} using base::c; diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp index 473e291b0..f345af632 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp @@ -41,11 +41,11 @@ struct test : base(comp, a) {} test(const value_compare& comp, const container_type& c, const test_allocator& a) : base(comp, c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(const value_compare& comp, container_type&& c, const test_allocator& a) : base(comp, std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} using base::c; diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp index ec6b2befb..a518ffc98 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp @@ -41,11 +41,11 @@ struct test : base(comp, a) {} test(const value_compare& comp, const container_type& c, const test_allocator& a) : base(comp, c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(const value_compare& comp, container_type&& c, const test_allocator& a) : base(comp, std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} using base::c; diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp index 757f1e3ef..901a18a68 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp @@ -17,7 +17,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -52,11 +52,11 @@ struct test using base::c; }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test qo(std::less(), make > >(5), test_allocator(2)); @@ -64,5 +64,5 @@ int main() assert(q.size() == 5); assert(q.c.get_allocator() == test_allocator(6)); assert(q.top() == MoveOnly(4)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp index 7d0a6848d..d34c8fa62 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,15 +28,15 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::priority_queue qo(std::less(), make >(5)); std::priority_queue q; q = std::move(qo); assert(q.size() == 5); assert(q.top() == MoveOnly(4)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp index 52b264204..a734f7229 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,13 +28,13 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::priority_queue q(std::less(), make >(5)); assert(q.size() == 5); assert(q.top() == MoveOnly(4)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp index 98da133a8..ac72cc38f 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int a[] = {3, 5, 2, 0, 6, 8, 1}; const int n = sizeof(a)/sizeof(a[0]); std::priority_queue q(a+n/2, a+n, @@ -28,5 +28,5 @@ int main() std::vector(a, a+n/2)); assert(q.size() == n); assert(q.top() == MoveOnly(8)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp index e1fcf2286..2f30b36c4 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,14 +28,14 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::priority_queue qo(std::less(), make >(5)); std::priority_queue q = std::move(qo); assert(q.size() == 5); assert(q.top() == MoveOnly(4)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp index e4b352142..34bbd27e8 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::priority_queue q; q.emplace(1, 2.5); assert(q.top() == Emplaceable(1, 2.5)); @@ -28,5 +28,5 @@ int main() assert(q.top() == Emplaceable(3, 4.5)); q.emplace(2, 3.5); assert(q.top() == Emplaceable(3, 4.5)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp b/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp index 032766bba..93674b0c1 100644 --- a/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp +++ b/test/containers/sequences/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::priority_queue q; q.push(1); assert(q.top() == 1); @@ -28,5 +28,5 @@ int main() assert(q.top() == 3); q.push(2); assert(q.top() == 3); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp index 122732b28..4e231b50e 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp @@ -24,10 +24,10 @@ struct test explicit test(const test_allocator& a) : base(a) {} test(const container_type& c, const test_allocator& a) : base(c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(container_type&& c, const test_allocator& a) : base(std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} }; diff --git a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp index 711aa918f..cdb4fcfc7 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp @@ -36,10 +36,10 @@ struct test explicit test(const test_allocator& a) : base(a) {} test(const container_type& c, const test_allocator& a) : base(c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(container_type&& c, const test_allocator& a) : base(std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} }; diff --git a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp index ee5950eb0..951160dd8 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../../test_allocator.h" #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -47,13 +47,13 @@ struct test allocator_type get_allocator() {return this->c.get_allocator();} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test q(make(5), test_allocator(4)); assert(q.get_allocator() == test_allocator(4)); assert(q.size() == 5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp index 47250b3f1..c080f5f88 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../../test_allocator.h" #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -47,14 +47,14 @@ struct test allocator_type get_allocator() {return this->c.get_allocator();} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test q(make(5), test_allocator(4)); test q2(std::move(q), test_allocator(5)); assert(q2.get_allocator() == test_allocator(5)); assert(q2.size() == 5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_move.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_move.pass.cpp index 4ffaaf68f..c7e4b86b8 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_move.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_move.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,14 +28,14 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::queue q(make >(5)); std::queue q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp index cade12568..16a2faadc 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,12 +28,12 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::queue q(make >(5)); assert(q.size() == 5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/queue/queue.defn/assign_move.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.defn/assign_move.pass.cpp index 71a689cc2..e655c3216 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.defn/assign_move.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.defn/assign_move.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,15 +28,15 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::queue q(make >(5)); std::queue q2; q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/queue/queue.defn/emplace.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.defn/emplace.pass.cpp index a54172f68..eda8b937c 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.defn/emplace.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.defn/emplace.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::queue q; q.emplace(1, 2.5); q.emplace(2, 3.5); @@ -26,5 +26,5 @@ int main() assert(q.size() == 3); assert(q.front() == Emplaceable(1, 2.5)); assert(q.back() == Emplaceable(3, 4.5)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/queue/queue.defn/push_rv.pass.cpp b/test/containers/sequences/container.adaptors/queue/queue.defn/push_rv.pass.cpp index 4bc35ab6e..88cf26455 100644 --- a/test/containers/sequences/container.adaptors/queue/queue.defn/push_rv.pass.cpp +++ b/test/containers/sequences/container.adaptors/queue/queue.defn/push_rv.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::queue q; q.push(MoveOnly(1)); assert(q.size() == 1); @@ -32,5 +32,5 @@ int main() assert(q.size() == 3); assert(q.front() == MoveOnly(1)); assert(q.back() == MoveOnly(3)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp index 1e3f5ce2e..2ae47cddf 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp @@ -24,10 +24,10 @@ struct test explicit test(const test_allocator& a) : base(a) {} test(const container_type& c, const test_allocator& a) : base(c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(container_type&& c, const test_allocator& a) : base(std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} }; diff --git a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp index 9cdffac8f..1c777d16d 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp @@ -36,10 +36,10 @@ struct test explicit test(const test_allocator& a) : base(a) {} test(const container_type& c, const test_allocator& a) : base(c, a) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(container_type&& c, const test_allocator& a) : base(std::move(c), a) {} test(test&& q, const test_allocator& a) : base(std::move(q), a) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES test_allocator get_allocator() {return c.get_allocator();} }; diff --git a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp index 2c5c5f975..e1c69824b 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../../test_allocator.h" #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -47,13 +47,13 @@ struct test allocator_type get_allocator() {return this->c.get_allocator();} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test q(make(5), test_allocator(4)); assert(q.get_allocator() == test_allocator(4)); assert(q.size() == 5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp index 8af2510c6..fa315cb74 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp @@ -18,7 +18,7 @@ #include "../../../../test_allocator.h" #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -47,14 +47,14 @@ struct test allocator_type get_allocator() {return this->c.get_allocator();} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test q(make(5), test_allocator(4)); test q2(std::move(q), test_allocator(5)); assert(q2.get_allocator() == test_allocator(5)); assert(q2.size() == 5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_move.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_move.pass.cpp index 0646d0b20..96baadce0 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_move.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_move.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,14 +28,14 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::stack q(make >(5)); std::stack q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp index bdb4a353a..53dd98e8a 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,12 +28,12 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::stack q(make >(5)); assert(q.size() == 5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/stack/stack.defn/assign_move.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.defn/assign_move.pass.cpp index cf4c4522b..c2df37164 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.defn/assign_move.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.defn/assign_move.pass.cpp @@ -16,7 +16,7 @@ #include "../../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template C @@ -28,15 +28,15 @@ make(int n) return c; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::stack q(make >(5)); std::stack q2; q2 = std::move(q); assert(q2.size() == 5); assert(q.empty()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/stack/stack.defn/emplace.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.defn/emplace.pass.cpp index 8a47c14ff..ba0fe08f1 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.defn/emplace.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.defn/emplace.pass.cpp @@ -18,12 +18,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::stack q; q.emplace(1, 2.5); q.emplace(2, 3.5); q.emplace(3, 4.5); assert(q.size() == 3); assert(q.top() == Emplaceable(3, 4.5)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/container.adaptors/stack/stack.defn/push_rv.pass.cpp b/test/containers/sequences/container.adaptors/stack/stack.defn/push_rv.pass.cpp index ce2edd34d..1d280de26 100644 --- a/test/containers/sequences/container.adaptors/stack/stack.defn/push_rv.pass.cpp +++ b/test/containers/sequences/container.adaptors/stack/stack.defn/push_rv.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::stack q; q.push(MoveOnly(1)); assert(q.size() == 1); @@ -29,5 +29,5 @@ int main() q.push(MoveOnly(3)); assert(q.size() == 3); assert(q.top() == MoveOnly(3)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp b/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp index 41de880e9..26555dbf8 100644 --- a/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque d; d.assign({3, 4, 5, 6}); assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp b/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp index e50bf1551..ead192241 100644 --- a/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque d = {3, 4, 5, 6}; assert(d.size() == 4); assert(d[0] == 3); assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp b/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp index b532de80f..3eaf6745a 100644 --- a/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque> d({3, 4, 5, 6}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -26,5 +26,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/move.pass.cpp b/test/containers/sequences/deque/deque.cons/move.pass.cpp index 29370f97f..07505e220 100644 --- a/test/containers/sequences/deque/deque.cons/move.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); @@ -50,5 +50,5 @@ int main() assert(c1.size() == 0); assert(c3.get_allocator() == c1.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/move_alloc.pass.cpp b/test/containers/sequences/deque/deque.cons/move_alloc.pass.cpp index e4b5bb20c..5104f1fa0 100644 --- a/test/containers/sequences/deque/deque.cons/move_alloc.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/move_alloc.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); @@ -65,5 +65,5 @@ int main() assert(c3.get_allocator() == A(3)); assert(c1.size() != 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/move_assign.pass.cpp b/test/containers/sequences/deque/deque.cons/move_assign.pass.cpp index bac22eccc..cefd8cffc 100644 --- a/test/containers/sequences/deque/deque.cons/move_assign.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/move_assign.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); @@ -68,5 +68,5 @@ int main() assert(c1.size() == 0); assert(c3.get_allocator() == A(5)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp b/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp index ff5d0c6f1..b03752bcd 100644 --- a/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque d; d = {3, 4, 5, 6}; assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.cons/size.pass.cpp b/test/containers/sequences/deque/deque.cons/size.pass.cpp index 4322584c3..c122eecfd 100644 --- a/test/containers/sequences/deque/deque.cons/size.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/size.pass.cpp @@ -29,10 +29,10 @@ test(unsigned n) assert(DefaultOnly::count == n); assert(d.size() == n); assert(distance(d.begin(), d.end()) == d.size()); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == T()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } assert(DefaultOnly::count == 0); } diff --git a/test/containers/sequences/deque/deque.modifiers/emplace.pass.cpp b/test/containers/sequences/deque/deque.modifiers/emplace.pass.cpp index 15257e78d..102bfc5ec 100644 --- a/test/containers/sequences/deque/deque.modifiers/emplace.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/emplace.pass.cpp @@ -16,7 +16,7 @@ #include "../../../Emplaceable.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque make(int size, int start = 0 ) @@ -85,15 +85,15 @@ testN(int start, int N) } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; const int N = sizeof(rng)/sizeof(rng[0]); for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) testN(rng[i], rng[j]); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp b/test/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp index a08cc9522..ab584a1dc 100644 --- a/test/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp @@ -16,7 +16,7 @@ #include "../../../Emplaceable.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque make(int size, int start = 0 ) @@ -60,15 +60,15 @@ testN(int start, int N) test(c1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; const int N = sizeof(rng)/sizeof(rng[0]); for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) testN(rng[i], rng[j]); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp b/test/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp index bf7e802b4..d4fe6fe22 100644 --- a/test/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp @@ -16,7 +16,7 @@ #include "../../../Emplaceable.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque make(int size, int start = 0 ) @@ -60,15 +60,15 @@ testN(int start, int N) test(c1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; const int N = sizeof(rng)/sizeof(rng[0]); for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) testN(rng[i], rng[j]); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp index cd050319c..fafbeb45e 100644 --- a/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque d(10, 1); std::deque::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6}); assert(d.size() == 14); @@ -35,5 +35,5 @@ int main() assert(d[11] == 1); assert(d[12] == 1); assert(d[13] == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp b/test/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp index 01936a45e..0f8499aa8 100644 --- a/test/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp @@ -200,7 +200,7 @@ testNI(int start, int N, int M) void test_move() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque > c; typedef std::deque::const_iterator CI; { @@ -219,7 +219,7 @@ test_move() j = 0; for (CI i = c.begin(); i != c.end(); ++i, ++j) assert(*i == MoveOnly(j)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } int main() diff --git a/test/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp b/test/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp index 95f4bb413..3d01b0fcb 100644 --- a/test/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp @@ -16,7 +16,7 @@ #include "../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque make(int size, int start = 0 ) @@ -91,15 +91,15 @@ testN(int start, int N) } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; const int N = sizeof(rng)/sizeof(rng[0]); for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) testN(rng[i], rng[j]); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp b/test/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp index 51c4c8142..ee0f37dcf 100644 --- a/test/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp @@ -18,7 +18,7 @@ #include "../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque make(int size, int start = 0 ) @@ -54,14 +54,14 @@ void test(int size) } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; const int N = sizeof(rng)/sizeof(rng[0]); for (int j = 0; j < N; ++j) test(rng[j]); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp b/test/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp index 768f721e3..86c28f0f4 100644 --- a/test/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp @@ -16,7 +16,7 @@ #include "../../../MoveOnly.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::deque make(int size, int start = 0 ) @@ -63,15 +63,15 @@ testN(int start, int N) test(c1, -10); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; const int N = sizeof(rng)/sizeof(rng[0]); for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) testN(rng[i], rng[j]); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp index ce1c6760e..f9b22304f 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp @@ -17,7 +17,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; typedef std::forward_list C; @@ -40,5 +40,5 @@ int main() assert(*i == 10+n); assert(n == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp index 2b3a2b1fe..703efb8bf 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly T; typedef test_allocator A; @@ -158,5 +158,5 @@ int main() assert(c1.get_allocator() == A(10)); assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp index 0fe1ab49d..a8685cdd0 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp @@ -17,7 +17,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; typedef std::forward_list C; @@ -40,5 +40,5 @@ int main() assert(*i == 10+n); assert(n == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp index 8ea773f29..7a5e2ae96 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; typedef std::forward_list C; @@ -26,5 +26,5 @@ int main() assert(*i == n); assert(n == 10); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp index be41b88e8..f9b2097ab 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; typedef test_allocator A; @@ -30,5 +30,5 @@ int main() assert(n == 10); assert(c.get_allocator() == A(14)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp index 4d920971d..67d625ef6 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly T; typedef test_allocator A; @@ -51,5 +51,5 @@ int main() assert(c0.empty()); assert(c.get_allocator() == A(10)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp index 7be1b320f..197fa1381 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly T; typedef test_allocator A; @@ -51,5 +51,5 @@ int main() assert(!c0.empty()); assert(c.get_allocator() == A(9)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp index cd5393ba4..3e67f4704 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp @@ -25,7 +25,7 @@ int main() C c = N; unsigned n = 0; for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n) -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(*i == T()); #else ; diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp index 400571243..afc60a50c 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp @@ -25,7 +25,7 @@ int main() C c(N); unsigned n = 0; for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n) -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(*i == T()); #else ; diff --git a/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp index 492b1b973..a051e2977 100644 --- a/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef Emplaceable T; typedef std::forward_list C; @@ -51,5 +51,5 @@ int main() assert(*next(c.begin(), 3) == Emplaceable(2, 3.5)); assert(distance(c.begin(), c.end()) == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp index adf614d8c..1ba580c70 100644 --- a/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef Emplaceable T; typedef std::forward_list C; @@ -31,5 +31,5 @@ int main() assert(*next(c.begin()) == Emplaceable()); assert(distance(c.begin(), c.end()) == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp index 83bfdadac..20b54fe67 100644 --- a/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; typedef std::forward_list C; @@ -42,5 +42,5 @@ int main() assert(*next(c.begin(), 3) == 1); assert(*next(c.begin(), 4) == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp index 0809dd1de..d0259cb49 100644 --- a/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly T; typedef std::forward_list C; @@ -51,5 +51,5 @@ int main() assert(*next(c.begin(), 3) == 2); assert(distance(c.begin(), c.end()) == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp index 2891b760b..7859dce29 100644 --- a/test/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp @@ -31,7 +31,7 @@ int main() c.pop_front(); assert(distance(c.begin(), c.end()) == 0); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly T; typedef std::forward_list C; @@ -44,5 +44,5 @@ int main() c.pop_front(); assert(distance(c.begin(), c.end()) == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp index 17d0e712f..616a5afce 100644 --- a/test/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef MoveOnly T; typedef std::forward_list C; @@ -31,5 +31,5 @@ int main() assert(*next(c.begin()) == 1); assert(distance(c.begin(), c.end()) == 2); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp b/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp index fc4a55caf..69c7449b1 100644 --- a/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list d; d.assign({3, 4, 5, 6}); assert(d.size() == 4); @@ -25,5 +25,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/assign_move.pass.cpp b/test/containers/sequences/list/list.cons/assign_move.pass.cpp index c2ca3fac8..0ee56948b 100644 --- a/test/containers/sequences/list/list.cons/assign_move.pass.cpp +++ b/test/containers/sequences/list/list.cons/assign_move.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::list > l(test_allocator(5)); std::list > lo(test_allocator(5)); @@ -61,5 +61,5 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/initializer_list.pass.cpp b/test/containers/sequences/list/list.cons/initializer_list.pass.cpp index 8d55299b5..c69d3cbd4 100644 --- a/test/containers/sequences/list/list.cons/initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.cons/initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list d = {3, 4, 5, 6}; assert(d.size() == 4); std::list::iterator i = d.begin(); @@ -24,5 +24,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp b/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp index e8a7f84cb..0a620f33f 100644 --- a/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list> d({3, 4, 5, 6}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -27,5 +27,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/move.pass.cpp b/test/containers/sequences/list/list.cons/move.pass.cpp index 2d331e20d..ff41d80e5 100644 --- a/test/containers/sequences/list/list.cons/move.pass.cpp +++ b/test/containers/sequences/list/list.cons/move.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::list > l(test_allocator(5)); std::list > lo(test_allocator(5)); @@ -45,5 +45,5 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/move_alloc.pass.cpp b/test/containers/sequences/list/list.cons/move_alloc.pass.cpp index f91f12af7..575e16582 100644 --- a/test/containers/sequences/list/list.cons/move_alloc.pass.cpp +++ b/test/containers/sequences/list/list.cons/move_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::list > l(test_allocator(5)); std::list > lo(test_allocator(5)); @@ -58,5 +58,5 @@ int main() assert(!l.empty()); assert(l2.get_allocator() == other_allocator(4)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp b/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp index d3715f3cd..c43f0b92e 100644 --- a/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list d; d = {3, 4, 5, 6}; assert(d.size() == 4); @@ -25,5 +25,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.cons/size_type.pass.cpp b/test/containers/sequences/list/list.cons/size_type.pass.cpp index 4d34e23f8..77f470115 100644 --- a/test/containers/sequences/list/list.cons/size_type.pass.cpp +++ b/test/containers/sequences/list/list.cons/size_type.pass.cpp @@ -40,11 +40,11 @@ int main() ++i; assert(*i == 0); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::list l(3); assert(l.size() == 3); assert(std::distance(l.begin(), l.end()) == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.modifiers/emplace.pass.cpp b/test/containers/sequences/list/list.modifiers/emplace.pass.cpp index 9a5e6e79a..ecd729304 100644 --- a/test/containers/sequences/list/list.modifiers/emplace.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/emplace.pass.cpp @@ -31,7 +31,7 @@ public: int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list c; c.emplace(c.cbegin(), 2, 3.5); assert(c.size() == 1); @@ -43,5 +43,5 @@ int main() assert(c.front().getd() == 3.5); assert(c.back().geti() == 3); assert(c.back().getd() == 4.5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.modifiers/emplace_back.pass.cpp b/test/containers/sequences/list/list.modifiers/emplace_back.pass.cpp index baea60e2f..c9c426484 100644 --- a/test/containers/sequences/list/list.modifiers/emplace_back.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/emplace_back.pass.cpp @@ -31,7 +31,7 @@ public: int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list c; c.emplace_back(2, 3.5); assert(c.size() == 1); @@ -43,5 +43,5 @@ int main() assert(c.front().getd() == 3.5); assert(c.back().geti() == 3); assert(c.back().getd() == 4.5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.modifiers/emplace_front.pass.cpp b/test/containers/sequences/list/list.modifiers/emplace_front.pass.cpp index 73956ac0e..6ae300df9 100644 --- a/test/containers/sequences/list/list.modifiers/emplace_front.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/emplace_front.pass.cpp @@ -31,7 +31,7 @@ public: int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list c; c.emplace_front(2, 3.5); assert(c.size() == 1); @@ -43,5 +43,5 @@ int main() assert(c.front().getd() == 4.5); assert(c.back().geti() == 2); assert(c.back().getd() == 3.5); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp index 39b4ee11f..e0b4133df 100644 --- a/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list d(10, 1); std::list::iterator i = d.insert(next(d.cbegin(), 2), {3, 4, 5, 6}); assert(d.size() == 14); @@ -36,5 +36,5 @@ int main() assert(*i++ == 1); assert(*i++ == 1); assert(*i++ == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp b/test/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp index 5d43bd123..95847989d 100644 --- a/test/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list l1; l1.insert(l1.cend(), MoveOnly(1)); assert(l1.size() == 1); @@ -27,5 +27,5 @@ int main() assert(l1.size() == 2); assert(l1.front() == MoveOnly(2)); assert(l1.back() == MoveOnly(1)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp b/test/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp index 0f0160a47..c6b293ebb 100644 --- a/test/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list l1; l1.push_back(MoveOnly(1)); assert(l1.size() == 1); @@ -27,5 +27,5 @@ int main() assert(l1.size() == 2); assert(l1.front() == MoveOnly(1)); assert(l1.back() == MoveOnly(2)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp b/test/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp index b8addaf90..caab4c101 100644 --- a/test/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::list l1; l1.push_front(MoveOnly(1)); assert(l1.size() == 1); @@ -27,5 +27,5 @@ int main() assert(l1.size() == 2); assert(l1.front() == MoveOnly(2)); assert(l1.back() == MoveOnly(1)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp b/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp index 787cb3f2f..caa9f59c5 100644 --- a/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d; d.assign({true, false, false, true}); assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/assign_move.pass.cpp b/test/containers/sequences/vector.bool/assign_move.pass.cpp index f1461f293..bbb6ac266 100644 --- a/test/containers/sequences/vector.bool/assign_move.pass.cpp +++ b/test/containers/sequences/vector.bool/assign_move.pass.cpp @@ -17,7 +17,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > l(test_allocator(5)); std::vector > lo(test_allocator(5)); @@ -60,5 +60,5 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/initializer_list.pass.cpp b/test/containers/sequences/vector.bool/initializer_list.pass.cpp index e5e58469b..6b2b15465 100644 --- a/test/containers/sequences/vector.bool/initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d = {true, false, false, true}; assert(d.size() == 4); assert(d[0] == true); assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp b/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp index 7d493635a..95af6b9e9 100644 --- a/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector> d({true, false, false, true}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -26,5 +26,5 @@ int main() assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp index c2b314e3a..81ce675cb 100644 --- a/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d(10, true); std::vector::iterator i = d.insert(d.cbegin() + 2, {false, true, true, false}); assert(d.size() == 14); @@ -35,5 +35,5 @@ int main() assert(d[11] == true); assert(d[12] == true); assert(d[13] == true); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/move.pass.cpp b/test/containers/sequences/vector.bool/move.pass.cpp index f2cc56eb6..b454aec2e 100644 --- a/test/containers/sequences/vector.bool/move.pass.cpp +++ b/test/containers/sequences/vector.bool/move.pass.cpp @@ -17,7 +17,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > l(test_allocator(5)); std::vector > lo(test_allocator(5)); @@ -44,5 +44,5 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/move_alloc.pass.cpp b/test/containers/sequences/vector.bool/move_alloc.pass.cpp index b3911b4a2..83ea071b5 100644 --- a/test/containers/sequences/vector.bool/move_alloc.pass.cpp +++ b/test/containers/sequences/vector.bool/move_alloc.pass.cpp @@ -17,7 +17,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > l(test_allocator(5)); std::vector > lo(test_allocator(5)); @@ -57,5 +57,5 @@ int main() assert(!l.empty()); assert(l2.get_allocator() == other_allocator(4)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp b/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp index de759e3cb..4990b8d49 100644 --- a/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d; d = {true, false, false, true}; assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp b/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp index 8d58f43b6..5863e4497 100644 --- a/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp +++ b/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector v(100); v.resize(50); @@ -37,7 +37,7 @@ int main() assert(v.size() == 200); assert(v.capacity() >= 200); } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector v(100); v.resize(50); @@ -56,5 +56,5 @@ int main() assert(v.size() == 200); assert(v.capacity() >= 200); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp index 80a3c2723..8a31b8603 100644 --- a/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d; d.assign({3, 4, 5, 6}); assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp b/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp index 38b6d2ec1..f14cf6b07 100644 --- a/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > l(test_allocator(5)); std::vector > lo(test_allocator(5)); @@ -61,5 +61,5 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp b/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp index eb381aebc..36cc764e0 100644 --- a/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp @@ -24,10 +24,10 @@ test(typename C::size_type n) assert(c.__invariants()); assert(c.size() == n); assert(c.get_allocator() == typename C::allocator_type()); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i) assert(*i == typename C::value_type()); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } int main() diff --git a/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp index 243d1f688..5185c7290 100644 --- a/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d = {3, 4, 5, 6}; assert(d.size() == 4); assert(d[0] == 3); assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp index c10d64069..5a6074b68 100644 --- a/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector> d({3, 4, 5, 6}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -26,5 +26,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.cons/move.pass.cpp b/test/containers/sequences/vector/vector.cons/move.pass.cpp index 13b5efd88..568f0fa29 100644 --- a/test/containers/sequences/vector/vector.cons/move.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/move.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > l(test_allocator(5)); std::vector > lo(test_allocator(5)); @@ -45,5 +45,5 @@ int main() assert(l.empty()); assert(l2.get_allocator() == lo.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp index 1f20666a6..a05fd4c2c 100644 --- a/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector > l(test_allocator(5)); std::vector > lo(test_allocator(5)); @@ -58,5 +58,5 @@ int main() assert(!l.empty()); assert(l2.get_allocator() == other_allocator(4)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp index b20cd192a..7b943e008 100644 --- a/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d; d = {3, 4, 5, 6}; assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp b/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp index 17c9cf378..05735c4df 100644 --- a/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp +++ b/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp @@ -15,7 +15,7 @@ #include #include "../../../stack_allocator.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES class A { @@ -49,11 +49,11 @@ public: double getd() const {return d_;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector c; std::vector::iterator i = c.emplace(c.cbegin(), 2, 3.5); @@ -102,5 +102,5 @@ int main() assert(c.back().geti() == 3); assert(c.back().getd() == 4.5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp b/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp index 96adbbdc9..a9f49fcec 100644 --- a/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp +++ b/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp @@ -15,7 +15,7 @@ #include #include "../../../stack_allocator.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES class A { @@ -49,11 +49,11 @@ public: double getd() const {return d_;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector c; c.emplace_back(2, 3.5); @@ -80,5 +80,5 @@ int main() assert(c.back().geti() == 3); assert(c.back().getd() == 4.5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp index ad840c55a..88f1f8d96 100644 --- a/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::vector d(10, 1); std::vector::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6}); assert(d.size() == 14); @@ -35,5 +35,5 @@ int main() assert(d[11] == 1); assert(d[12] == 1); assert(d[13] == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp index 7612aecd0..a5dc0fc5f 100644 --- a/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp +++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector v(100); std::vector::iterator i = v.insert(v.cbegin() + 10, MoveOnly(3)); @@ -43,5 +43,5 @@ int main() for (++j; j < 101; ++j) assert(v[j] == MoveOnly()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp b/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp index d888e176a..095332601 100644 --- a/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp +++ b/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::vector c; c.push_back(MoveOnly(0)); @@ -65,5 +65,5 @@ int main() for (int j = 0; j < c.size(); ++j) assert(c[j] == MoveOnly(j)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/test_allocator.h b/test/containers/test_allocator.h index 1c0f163d0..c5da7e639 100644 --- a/test/containers/test_allocator.h +++ b/test/containers/test_allocator.h @@ -59,10 +59,10 @@ public: {return UINT_MAX / sizeof(T);} void construct(pointer p, const T& val) {::new(p) T(val);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void construct(pointer p, T&& val) {::new(p) T(std::move(val));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void destroy(pointer p) {p->~T();} friend bool operator==(const test_allocator& x, const test_allocator& y) diff --git a/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp index 75577592a..16efdcaf0 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::allocator > A; typedef std::unordered_map > A; typedef std::unordered_map >, @@ -57,5 +57,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp index 410fe3e0e..a41e7f9b2 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map >, @@ -59,5 +59,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp index 2a2c10780..75aa6a4cc 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map >, @@ -60,5 +60,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp index 35366bd58..cc196428e 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map >, @@ -62,5 +62,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp index b23f0543f..353ba54af 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map >, @@ -63,5 +63,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp index 6d914b30c..8cc774457 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map >, @@ -103,5 +103,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp index 8074f57d4..8f23790c6 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair P; typedef test_allocator> A; @@ -108,5 +108,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unord.map.elem/index.pass.cpp b/test/containers/unord/unord.map/unord.map.elem/index.pass.cpp index 1e29014cc..99b62641e 100644 --- a/test/containers/unord/unord.map/unord.map.elem/index.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.elem/index.pass.cpp @@ -43,7 +43,7 @@ int main() assert(c.size() == 5); assert(c.at(11) == "eleven"); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map C; typedef std::pair P; @@ -64,5 +64,5 @@ int main() assert(c.size() == 5); assert(c.at(11) == "eleven"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unorder.map.modifiers/emplace.pass.cpp b/test/containers/unord/unord.map/unorder.map.modifiers/emplace.pass.cpp index 268edad8f..ab9b4b60b 100644 --- a/test/containers/unord/unord.map/unorder.map.modifiers/emplace.pass.cpp +++ b/test/containers/unord/unord.map/unorder.map.modifiers/emplace.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map C; typedef std::pair R; @@ -46,5 +46,5 @@ int main() assert(r.first->first == 5); assert(r.first->second == Emplaceable(6, 7)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unorder.map.modifiers/emplace_hint.pass.cpp b/test/containers/unord/unord.map/unorder.map.modifiers/emplace_hint.pass.cpp index c5b43cadf..3a821c596 100644 --- a/test/containers/unord/unord.map/unorder.map.modifiers/emplace_hint.pass.cpp +++ b/test/containers/unord/unord.map/unorder.map.modifiers/emplace_hint.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map C; typedef C::iterator R; @@ -44,5 +44,5 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unorder.map.modifiers/insert_hint_rvalue.pass.cpp b/test/containers/unord/unord.map/unorder.map.modifiers/insert_hint_rvalue.pass.cpp index a95549973..f4816aacb 100644 --- a/test/containers/unord/unord.map/unorder.map.modifiers/insert_hint_rvalue.pass.cpp +++ b/test/containers/unord/unord.map/unorder.map.modifiers/insert_hint_rvalue.pass.cpp @@ -50,7 +50,7 @@ int main() assert(r->first == 5.5); assert(r->second == 4); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map C; typedef C::iterator R; @@ -77,5 +77,5 @@ int main() assert(r->first == 5); assert(r->second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp b/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp index a06bd676b..6511b2856 100644 --- a/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp +++ b/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map C; typedef std::pair P; @@ -44,5 +44,5 @@ int main() assert(c.at(3) == "three"); assert(c.at(4) == "four"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.map/unorder.map.modifiers/insert_rvalue.pass.cpp b/test/containers/unord/unord.map/unorder.map.modifiers/insert_rvalue.pass.cpp index b552e5659..65f9b6b2d 100644 --- a/test/containers/unord/unord.map/unorder.map.modifiers/insert_rvalue.pass.cpp +++ b/test/containers/unord/unord.map/unorder.map.modifiers/insert_rvalue.pass.cpp @@ -53,7 +53,7 @@ int main() assert(r.first->first == 5.5); assert(r.first->second == 4); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map C; typedef std::pair R; @@ -83,5 +83,5 @@ int main() assert(r.first->first == 5); assert(r.first->second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp index 282c52262..912fdd540 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef test_allocator > A; typedef std::unordered_multimap > A; typedef std::unordered_multimap >, @@ -79,5 +79,5 @@ int main() assert(c.key_eq() == test_compare >()); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp index 192dc3fc7..f1b7df58d 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap >, @@ -81,5 +81,5 @@ int main() assert(c.key_eq() == test_compare >()); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp index 7d93d8008..e162963df 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap >, @@ -82,5 +82,5 @@ int main() assert(c.key_eq() == test_compare >()); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp index 2e31fe707..7d5387186 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap >, @@ -84,5 +84,5 @@ int main() assert(c.key_eq() == test_compare >(9)); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp index ef4120803..7eaa35a80 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap >, @@ -85,5 +85,5 @@ int main() assert(c.key_eq() == test_compare >(9)); assert((c.get_allocator() == test_allocator >(10))); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp index 77ab865ec..367f49117 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap >, @@ -125,5 +125,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp index 057b379dc..8868841db 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp @@ -27,7 +27,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair P; typedef test_allocator> A; @@ -156,5 +156,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp index b214cc258..d4b761c92 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap C; typedef C::iterator R; @@ -43,5 +43,5 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp index 09d36d674..a914fc2e4 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap C; typedef C::iterator R; @@ -52,5 +52,5 @@ int main() assert(r->first == 3); assert(r->second == Emplaceable(5, 6)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp index 063dc6daf..b9c7bcebe 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp @@ -50,7 +50,7 @@ int main() assert(r->first == 5.5); assert(r->second == 4); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap C; typedef C::iterator R; @@ -77,5 +77,5 @@ int main() assert(r->first == 5); assert(r->second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp index 8da87920a..1b2f10bbf 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap C; typedef std::pair P; @@ -69,5 +69,5 @@ int main() assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp index eaabf2483..637d01ea8 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp @@ -49,7 +49,7 @@ int main() assert(r->first == 5.5); assert(r->second == 4); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap C; typedef C::iterator R; @@ -75,5 +75,5 @@ int main() assert(r->first == 5); assert(r->second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/emplace.pass.cpp b/test/containers/unord/unord.multiset/emplace.pass.cpp index 8fdb176a7..6e3c12f5b 100644 --- a/test/containers/unord/unord.multiset/emplace.pass.cpp +++ b/test/containers/unord/unord.multiset/emplace.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset C; typedef C::iterator R; @@ -40,5 +40,5 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/emplace_hint.pass.cpp b/test/containers/unord/unord.multiset/emplace_hint.pass.cpp index a5f079c00..f6c7c294d 100644 --- a/test/containers/unord/unord.multiset/emplace_hint.pass.cpp +++ b/test/containers/unord/unord.multiset/emplace_hint.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset C; typedef C::iterator R; @@ -41,5 +41,5 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp b/test/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp index f7db00b19..08018c73c 100644 --- a/test/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp +++ b/test/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp @@ -44,7 +44,7 @@ int main() assert(c.size() == 4); assert(*r == 5.5); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset C; typedef C::iterator R; @@ -67,5 +67,5 @@ int main() assert(c.size() == 4); assert(*r == 5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/insert_init.pass.cpp b/test/containers/unord/unord.multiset/insert_init.pass.cpp index c21df28b8..e130a9b63 100644 --- a/test/containers/unord/unord.multiset/insert_init.pass.cpp +++ b/test/containers/unord/unord.multiset/insert_init.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset C; typedef int P; @@ -43,5 +43,5 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/insert_rvalue.pass.cpp b/test/containers/unord/unord.multiset/insert_rvalue.pass.cpp index bfa2f537e..a7a296d26 100644 --- a/test/containers/unord/unord.multiset/insert_rvalue.pass.cpp +++ b/test/containers/unord/unord.multiset/insert_rvalue.pass.cpp @@ -43,7 +43,7 @@ int main() assert(c.size() == 4); assert(*r == 5.5); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset C; typedef C::iterator R; @@ -65,5 +65,5 @@ int main() assert(c.size() == 4); assert(*r == 5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp index 1b1d657a9..5e66cc022 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef test_allocator A; typedef std::unordered_multiset A; typedef std::unordered_multiset >, @@ -55,5 +55,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp index 20c80a175..7bd045694 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset >, @@ -57,5 +57,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp index 452d0b12a..ded4abf9b 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset >, @@ -59,5 +59,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp index 0b00a0ae7..fb58af5c3 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset >, @@ -60,5 +60,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp index b147eab2f..1cea70e39 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset >, @@ -61,5 +61,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp index 5b665a855..7f2172290 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset >, @@ -100,5 +100,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp index 064f1caab..157655759 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int P; typedef test_allocator A; @@ -115,5 +115,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/emplace.pass.cpp b/test/containers/unord/unord.set/emplace.pass.cpp index b2ff328b9..956f92a49 100644 --- a/test/containers/unord/unord.set/emplace.pass.cpp +++ b/test/containers/unord/unord.set/emplace.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set C; typedef std::pair R; @@ -43,5 +43,5 @@ int main() assert(*r.first == Emplaceable(5, 6)); assert(!r.second); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/emplace_hint.pass.cpp b/test/containers/unord/unord.set/emplace_hint.pass.cpp index 390885bd8..6f9330207 100644 --- a/test/containers/unord/unord.set/emplace_hint.pass.cpp +++ b/test/containers/unord/unord.set/emplace_hint.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set C; typedef C::iterator R; @@ -41,5 +41,5 @@ int main() assert(c.size() == 2); assert(*r == Emplaceable(5, 6)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/insert_hint_rvalue.pass.cpp b/test/containers/unord/unord.set/insert_hint_rvalue.pass.cpp index 220634dd9..0dcf09fe8 100644 --- a/test/containers/unord/unord.set/insert_hint_rvalue.pass.cpp +++ b/test/containers/unord/unord.set/insert_hint_rvalue.pass.cpp @@ -44,7 +44,7 @@ int main() assert(c.size() == 3); assert(*r == 5.5); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set C; typedef C::iterator R; @@ -67,5 +67,5 @@ int main() assert(c.size() == 3); assert(*r == 5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/insert_init.pass.cpp b/test/containers/unord/unord.set/insert_init.pass.cpp index 09093ca55..f29f5e368 100644 --- a/test/containers/unord/unord.set/insert_init.pass.cpp +++ b/test/containers/unord/unord.set/insert_init.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set C; typedef int P; @@ -43,5 +43,5 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/insert_rvalue.pass.cpp b/test/containers/unord/unord.set/insert_rvalue.pass.cpp index 11fa6ef65..7f3d29763 100644 --- a/test/containers/unord/unord.set/insert_rvalue.pass.cpp +++ b/test/containers/unord/unord.set/insert_rvalue.pass.cpp @@ -47,7 +47,7 @@ int main() assert(*r.first == 5.5); assert(r.second); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set C; typedef std::pair R; @@ -73,5 +73,5 @@ int main() assert(*r.first == 5); assert(r.second); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp index 9089d41fb..9205632eb 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef test_allocator A; typedef std::unordered_set A; typedef std::unordered_set >, @@ -55,5 +55,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp index 7523956be..529f021b7 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set >, @@ -57,5 +57,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp index b32889b23..1d6f1aba9 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set >, @@ -59,5 +59,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp index b1226a192..7d5c0f136 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set >, @@ -60,5 +60,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp index da23591e9..1d434414d 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set >, @@ -61,5 +61,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp index 39aa0e59a..9d9a858c7 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set >, @@ -100,5 +100,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp index b6b3419e7..3e0207480 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int P; typedef test_allocator A; @@ -107,5 +107,5 @@ int main() assert(c0.empty()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp b/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp index 8dbf0ca54..a927e4b8b 100644 --- a/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp +++ b/test/input.output/file.streams/fstreams/filebuf.assign/move_assign.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::filebuf f; assert(f.open("test.dat", std::ios_base::out | std::ios_base::in @@ -50,5 +50,5 @@ int main() assert(f2.sgetc() == L'2'); } remove("test.dat"); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp b/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp index d25d4e89e..c3c9e316a 100644 --- a/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp +++ b/test/input.output/file.streams/fstreams/filebuf.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::filebuf f; assert(f.open("test.dat", std::ios_base::out | std::ios_base::in @@ -48,5 +48,5 @@ int main() assert(f2.sgetc() == L'2'); } remove("test.dat"); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp b/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp index 1f7f2a1b5..e76900ad2 100644 --- a/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp +++ b/test/input.output/file.streams/fstreams/fstream.assign/move_assign.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::fstream fso("test.dat", std::ios_base::in | std::ios_base::out | std::ios_base::trunc); @@ -44,5 +44,5 @@ int main() assert(x == 3.25); } std::remove("test.dat"); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp b/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp index efc1386d5..2334e2008 100644 --- a/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp +++ b/test/input.output/file.streams/fstreams/fstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::fstream fso("test.dat", std::ios_base::in | std::ios_base::out | std::ios_base::trunc); @@ -42,5 +42,5 @@ int main() assert(x == 3.25); } std::remove("test.dat"); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp b/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp index 2b864fd05..6d0163b85 100644 --- a/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp +++ b/test/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ifstream fso("test.dat"); std::ifstream fs; @@ -36,5 +36,5 @@ int main() fs >> x; assert(x == 3.25); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp b/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp index b8ed752da..7f3ca15c7 100644 --- a/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp +++ b/test/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ifstream fso("test.dat"); std::ifstream fs = move(fso); @@ -34,5 +34,5 @@ int main() fs >> x; assert(x == 3.25); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp b/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp index 2d637a502..02e402796 100644 --- a/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp +++ b/test/input.output/file.streams/fstreams/ofstream.assign/move_assign.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ofstream fso("test.dat"); std::ofstream fs; @@ -46,5 +46,5 @@ int main() assert(x == 3.25); } remove("test.dat"); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp b/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp index cacd615fb..1a9033889 100644 --- a/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp +++ b/test/input.output/file.streams/fstreams/ofstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ofstream fso("test.dat"); std::ofstream fs = move(fso); @@ -44,5 +44,5 @@ int main() assert(x == 3.25); } remove("test.dat"); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp b/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp index b5da10207..5d2c7cae5 100644 --- a/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp +++ b/test/input.output/iostream.format/input.streams/iostreamclass/iostream.assign/move_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct testbuf @@ -37,11 +37,11 @@ struct test_iostream {base::operator=(std::move(s)); return *this;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb1; testbuf sb2; @@ -88,5 +88,5 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp b/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp index 8d9dd0679..420d9380a 100644 --- a/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp +++ b/test/input.output/iostream.format/input.streams/iostreamclass/iostream.cons/move.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct testbuf @@ -37,11 +37,11 @@ struct test_iostream : base(std::move(s)) {} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb; test_iostream is1(&sb); @@ -74,5 +74,5 @@ int main() assert(is.precision() == 6); assert(is.getloc().name() == "C"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp b/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp index b238263ec..37a748945 100644 --- a/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp +++ b/test/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct testbuf @@ -42,11 +42,11 @@ public: CharT* egptr() const {return base::egptr();} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb(" 123"); int i = 0; @@ -59,5 +59,5 @@ int main() std::wistream(&sb) >> i; assert(i == 123); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp b/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp index daeb85a05..94a55509a 100644 --- a/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp +++ b/test/input.output/iostream.format/input.streams/istream/istream.assign/move_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct testbuf @@ -37,11 +37,11 @@ struct test_istream {base::operator=(std::move(s)); return *this;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb1; testbuf sb2; @@ -88,5 +88,5 @@ int main() assert(is2.precision() == 6); assert(is2.getloc().name() == "C"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp b/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp index 7b59eba13..1d1cbc082 100644 --- a/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp +++ b/test/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct testbuf @@ -37,11 +37,11 @@ struct test_istream : base(std::move(s)) {} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb; test_istream is1(&sb); @@ -74,5 +74,5 @@ int main() assert(is.precision() == 6); assert(is.getloc().name() == "C"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp b/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp index 71f1fdf6d..67f272e5a 100644 --- a/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp +++ b/test/input.output/iostream.format/output.streams/ostream.assign/move_assign.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct testbuf @@ -37,11 +37,11 @@ struct test_ostream {base::operator=(std::move(s)); return *this;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb1; testbuf sb2; @@ -88,5 +88,5 @@ int main() assert(os2.precision() == 6); assert(os2.getloc().name() == "C"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp b/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp index 96b2265c6..cfd8b0dec 100644 --- a/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp +++ b/test/input.output/iostream.format/output.streams/ostream.cons/move.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct testbuf @@ -37,11 +37,11 @@ struct test_ostream : base(std::move(s)) {} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb; test_ostream os1(&sb); @@ -70,5 +70,5 @@ int main() assert(os.precision() == 6); assert(os.getloc().name() == "C"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp b/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp index a6884f082..9a899edd8 100644 --- a/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp +++ b/test/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp @@ -19,7 +19,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template class testbuf @@ -53,11 +53,11 @@ protected: } }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { testbuf sb; std::ostream(&sb) << "testing..."; @@ -68,5 +68,5 @@ int main() std::wostream(&sb) << L"123"; assert(sb.str() == L"123"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp b/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp index cd83c7885..c883d0c96 100644 --- a/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp +++ b/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::istringstream ss0(" 123 456"); std::istringstream ss; @@ -46,5 +46,5 @@ int main() ss >> i; assert(i == 456); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp b/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp index 53587891a..b884b3915 100644 --- a/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp +++ b/test/input.output/string.streams/istringstream/istringstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::istringstream ss0(" 123 456"); std::istringstream ss(std::move(ss0)); @@ -44,5 +44,5 @@ int main() ss >> i; assert(i == 456); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp b/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp index 63e084628..fecc1459c 100644 --- a/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp +++ b/test/input.output/string.streams/ostringstream/ostringstream.assign/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ostringstream ss0(" 123 456"); std::ostringstream ss; @@ -42,5 +42,5 @@ int main() ss << i << ' ' << 567;; assert(ss.str() == L"234 5676"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp b/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp index 75d22ac87..701991c30 100644 --- a/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp +++ b/test/input.output/string.streams/ostringstream/ostringstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::ostringstream ss0(" 123 456"); std::ostringstream ss(std::move(ss0)); @@ -40,5 +40,5 @@ int main() ss << i << ' ' << 567;; assert(ss.str() == L"234 5676"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/string.streams/stringstream.cons/move.pass.cpp b/test/input.output/string.streams/stringstream.cons/move.pass.cpp index 280e164e5..f80af94b7 100644 --- a/test/input.output/string.streams/stringstream.cons/move.pass.cpp +++ b/test/input.output/string.streams/stringstream.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::stringstream ss0(" 123 456 "); std::stringstream ss(std::move(ss0)); @@ -48,5 +48,5 @@ int main() ss << i << ' ' << 123; assert(ss.str() == L"456 1236 "); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp b/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp index cbcbfb427..b42e4313f 100644 --- a/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp +++ b/test/input.output/string.streams/stringstream.cons/stringstream.assign/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::stringstream ss0(" 123 456 "); std::stringstream ss; @@ -50,5 +50,5 @@ int main() ss << i << ' ' << 123; assert(ss.str() == L"456 1236 "); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp b/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp index 761da2c23..01f975735 100644 --- a/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp +++ b/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/rv_value.pass.cpp @@ -17,7 +17,7 @@ #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #include @@ -32,11 +32,11 @@ test(C c) assert(c.back() == typename C::value_type()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(std::vector >()); #endif } diff --git a/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp b/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp index 9ce3b55cf..04d60e1d3 100644 --- a/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp +++ b/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/rv_value.pass.cpp @@ -16,7 +16,7 @@ #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #include @@ -31,11 +31,11 @@ test(C c) assert(c.front() == typename C::value_type()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test(std::list >()); #endif } diff --git a/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp b/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp index 4959b15c8..40630a9f5 100644 --- a/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp +++ b/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp @@ -17,7 +17,7 @@ #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #include #include @@ -51,11 +51,11 @@ struct do_nothing void operator()(void*) const {} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::unique_ptr Ptr; typedef std::vector C; C c1; @@ -91,5 +91,5 @@ int main() c2.push_back(Ptr(x+i)); insert3at(c2, c2.begin()+3, Ptr(x+3), Ptr(x+4), Ptr(x+5)); test(std::move(c1), 3, Ptr(x+3), Ptr(x+4), Ptr(x+5), c2); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp index b08d9bbd2..ada67404d 100644 --- a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp +++ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.index/difference_type.pass.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -33,26 +33,26 @@ test(It i, typename std::iterator_traits::difference_type n, assert(rr == x); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct do_nothing { void operator()(void*) const {} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { char s[] = "1234567890"; test(random_access_iterator(s+5), 4, '0'); test(s+5, 4, '0'); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int i[5]; typedef std::unique_ptr Ptr; Ptr p[5]; for (unsigned j = 0; j < 5; ++j) p[j].reset(i+j); test(p, 3, Ptr(i+3)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp index 1dcb59790..5d24151b5 100644 --- a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp +++ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp @@ -15,7 +15,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -40,22 +40,22 @@ test(It i, typename std::iterator_traits::value_type x) assert(x2 == x); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct do_nothing { void operator()(void*) const {} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { A a; test(&a, A()); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES int i; std::unique_ptr p(&i); test(&p, std::unique_ptr(&i)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp b/test/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp index 75f314e9b..6de6c1a18 100644 --- a/test/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp +++ b/test/iterators/predef.iterators/move.iterators/move.iterator/types.pass.cpp @@ -38,7 +38,7 @@ test() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same::value), ""); #else static_assert((std::is_same::value), ""); diff --git a/test/language.support/support.initlist/support.initlist.access/access.pass.cpp b/test/language.support/support.initlist/support.initlist.access/access.pass.cpp index c297b4fe8..80a4e9fa0 100644 --- a/test/language.support/support.initlist/support.initlist.access/access.pass.cpp +++ b/test/language.support/support.initlist/support.initlist.access/access.pass.cpp @@ -32,7 +32,7 @@ struct A int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES A test1 = {3, 2, 1}; #endif } diff --git a/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp b/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp index 7c6dc1c4b..edcff2f1b 100644 --- a/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp +++ b/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp @@ -30,7 +30,7 @@ struct A int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES A test1 = {3, 2, 1}; #endif } diff --git a/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp b/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp index 26890f5a1..d94976b27 100644 --- a/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp +++ b/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -53,5 +53,5 @@ int main() assert(v2[i][j] == a[i][j]); } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp b/test/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp index 4999023aa..cb97851c0 100644 --- a/test/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp +++ b/test/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -59,5 +59,5 @@ int main() assert(v2[i][j] == a[i][j]); } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp b/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp index 4457ea1e6..5a6eca09b 100644 --- a/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp +++ b/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -37,5 +37,5 @@ int main() for (int i = 0; i < N; ++i) assert(v[i] == a[i]); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp b/test/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp index ea115c3e6..b9de5006d 100644 --- a/test/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp +++ b/test/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -57,5 +57,5 @@ int main() assert(v2[i][j] == a[i][j]); } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp index c3d4b7643..90fbc408c 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::discrete_distribution<> D; D d = {}; @@ -77,5 +77,5 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp index 60680df2c..8668f2553 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::discrete_distribution<> D; typedef D::param_type P; @@ -84,5 +84,5 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp index afaecb766..79323f3e0 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp @@ -27,7 +27,7 @@ double f(double x) int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::piecewise_constant_distribution<> D; D d({}, f); @@ -74,5 +74,5 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp index bea2bfd7f..2dbc48bcc 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp @@ -24,7 +24,7 @@ double f(double x) int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::piecewise_constant_distribution<> D; typedef D::param_type P; @@ -75,5 +75,5 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp index ccf28eaa3..72f1258e4 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp @@ -27,7 +27,7 @@ double f(double x) int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::piecewise_linear_distribution<> D; D d({}, f); @@ -78,5 +78,5 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp index 357183fc8..38548df50 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp @@ -24,7 +24,7 @@ double f(double x) int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::piecewise_linear_distribution<> D; typedef D::param_type P; @@ -79,5 +79,5 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp b/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp index e8e1116b9..f8cbca9f1 100644 --- a/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp +++ b/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::seed_seq s= {5, 4, 3, 2, 1}; assert(s.size() == 5); unsigned b[5] = {0}; @@ -29,5 +29,5 @@ int main() assert(b[2] == 3); assert(b[3] == 2); assert(b[4] == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp b/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp index 8c03334ef..45969b4df 100644 --- a/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp +++ b/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::regex phone_numbers("\\d{3}-(\\d{4})"); const char phone_book[] = "start 555-1234, 555-2345, 555-3456 end"; @@ -60,5 +60,5 @@ int main() ++i; assert(i == std::cregex_token_iterator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/re/re.regex/re.regex.assign/assign.il.pass.cpp b/test/re/re.regex/re.regex.assign/assign.il.pass.cpp index d8b395fca..a09ca48ec 100644 --- a/test/re/re.regex/re.regex.assign/assign.il.pass.cpp +++ b/test/re/re.regex/re.regex.assign/assign.il.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::regex r2; r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}); assert(r2.flags() == std::regex::ECMAScript); @@ -29,5 +29,5 @@ int main() r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex::extended); assert(r2.flags() == std::regex::extended); assert(r2.mark_count() == 2); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/re/re.regex/re.regex.assign/il.pass.cpp b/test/re/re.regex/re.regex.assign/il.pass.cpp index ad91d86b1..b1527561c 100644 --- a/test/re/re.regex/re.regex.assign/il.pass.cpp +++ b/test/re/re.regex/re.regex.assign/il.pass.cpp @@ -18,10 +18,10 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::regex r2; r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}; assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/re/re.regex/re.regex.construct/il_flg.pass.cpp b/test/re/re.regex/re.regex.construct/il_flg.pass.cpp index 553b0449b..43e7fac1d 100644 --- a/test/re/re.regex/re.regex.construct/il_flg.pass.cpp +++ b/test/re/re.regex/re.regex.construct/il_flg.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void test(std::initializer_list il, std::regex_constants::syntax_option_type f, unsigned mc) @@ -27,11 +27,11 @@ test(std::initializer_list il, std::regex_constants::syntax_option_type f, assert(r.mark_count() == mc); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::string s1("\\(a\\)"); std::string s2("\\(a[bc]\\)"); std::string s3("\\(a\\([bc]\\)\\)"); @@ -66,5 +66,5 @@ int main() test({'\\', '(', 'a', '[', 'b', 'c', ']', '\\', ')'}, std::regex_constants::egrep, 0); test({'\\', '(', 'a', '\\', '(', '[', 'b', 'c', ']', '\\', ')', '\\', ')'}, std::regex_constants::egrep, 0); test({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex_constants::egrep, 2); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/re/test_allocator.h b/test/re/test_allocator.h index 1c0f163d0..c5da7e639 100644 --- a/test/re/test_allocator.h +++ b/test/re/test_allocator.h @@ -59,10 +59,10 @@ public: {return UINT_MAX / sizeof(T);} void construct(pointer p, const T& val) {::new(p) T(val);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void construct(pointer p, T&& val) {::new(p) T(std::move(val));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void destroy(pointer p) {p->~T();} friend bool operator==(const test_allocator& x, const test_allocator& y) diff --git a/test/strings/basic.string/string.cons/initializer_list.pass.cpp b/test/strings/basic.string/string.cons/initializer_list.pass.cpp index 36b4fe479..27eada483 100644 --- a/test/strings/basic.string/string.cons/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s = {'a', 'b', 'c'}; assert(s == "abc"); @@ -28,5 +28,5 @@ int main() s = {L'a', L'b', L'c'}; assert(s == L"abc"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp b/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp index 7a75fddea..596191bee 100644 --- a/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp +++ b/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s; s = {'a', 'b', 'c'}; assert(s == "abc"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.cons/move.pass.cpp b/test/strings/basic.string/string.cons/move.pass.cpp index 93553c6f9..904a0b89e 100644 --- a/test/strings/basic.string/string.cons/move.pass.cpp +++ b/test/strings/basic.string/string.cons/move.pass.cpp @@ -14,7 +14,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include "../test_allocator.h" @@ -31,15 +31,15 @@ test(S s0) assert(s2.get_allocator() == s1.get_allocator()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_allocator A; typedef std::basic_string, A> S; test(S(A(3))); test(S("1", A(5))); test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A(7))); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.cons/move_alloc.pass.cpp b/test/strings/basic.string/string.cons/move_alloc.pass.cpp index 3acb0055e..ccfe50891 100644 --- a/test/strings/basic.string/string.cons/move_alloc.pass.cpp +++ b/test/strings/basic.string/string.cons/move_alloc.pass.cpp @@ -14,7 +14,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include "../test_allocator.h" @@ -31,15 +31,15 @@ test(S s0, const typename S::allocator_type& a) assert(s2.get_allocator() == a); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef test_allocator A; typedef std::basic_string, A> S; test(S(), A(3)); test(S("1"), A(5)); test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A(7)); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.cons/move_assignment.pass.cpp b/test/strings/basic.string/string.cons/move_assignment.pass.cpp index 4d604b28b..455a0821f 100644 --- a/test/strings/basic.string/string.cons/move_assignment.pass.cpp +++ b/test/strings/basic.string/string.cons/move_assignment.pass.cpp @@ -15,7 +15,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include "../test_allocator.h" @@ -31,11 +31,11 @@ test(S s1, S s2) assert(s1.capacity() >= s1.size()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::string S; test(S(), S()); test(S("1"), S()); @@ -52,5 +52,5 @@ int main() test(S("1234567890123456789012345678901234567890123456789012345678901234567890" "1234567890123456789012345678901234567890123456789012345678901234567890"), S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp index c1b080689..b021af42c 100644 --- a/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s("123"); s.append({'a', 'b', 'c'}); assert(s == "123abc"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp index 36ea5cac3..7dab02015 100644 --- a/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s("123"); s.assign({'a', 'b', 'c'}); assert(s == "abc"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp index b64385db1..3ae9801cf 100644 --- a/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s("123456"); std::string::iterator i = s.insert(s.begin() + 3, {'a', 'b', 'c'}); assert(i - s.begin() == 3); assert(s == "123abc456"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.modifiers/string_op+=/initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_op+=/initializer_list.pass.cpp index cd32b4b76..7c1d89a4e 100644 --- a/test/strings/basic.string/string.modifiers/string_op+=/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_op+=/initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s("123"); s += {'a', 'b', 'c'}; assert(s == "123abc"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp index f9de1333b..cd8beeaa5 100644 --- a/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s("123def456"); s.replace(s.begin() + 3, s.begin() + 6, {'a', 'b', 'c'}); assert(s == "123abc456"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp b/test/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp index 6cd704bde..a7e0ad358 100644 --- a/test/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp +++ b/test/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s("initial text"); getline(std::istringstream(" abc* def* ghij"), s, '*'); @@ -31,5 +31,5 @@ int main() getline(std::wistringstream(L" abc* def* ghij"), s, L'*'); assert(s == L" abc"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp b/test/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp index 2a999cbf2..49187fb6f 100644 --- a/test/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp +++ b/test/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::string s("initial text"); getline(std::istringstream(" abc\n def\n ghij"), s); @@ -31,5 +31,5 @@ int main() getline(std::wistringstream(L" abc\n def\n ghij"), s); assert(s == L" abc"); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp b/test/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp index cbf046c78..383331ef9 100644 --- a/test/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp +++ b/test/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp @@ -27,7 +27,7 @@ test0(typename S::value_type lhs, const S& rhs, const S& x) assert(lhs + rhs == x); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -36,7 +36,7 @@ test1(typename S::value_type lhs, S&& rhs, const S& x) assert(lhs + move(rhs) == x); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::string S; @@ -47,12 +47,12 @@ int main() test0('a', S("1234567890"), S("a1234567890")); test0('a', S("12345678901234567890"), S("a12345678901234567890")); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1('a', S(""), S("a")); test1('a', S("12345"), S("a12345")); test1('a', S("1234567890"), S("a1234567890")); test1('a', S("12345678901234567890"), S("a12345678901234567890")); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp b/test/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp index 9a8dcedff..c9973a4f4 100644 --- a/test/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp +++ b/test/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp @@ -27,7 +27,7 @@ test0(const typename S::value_type* lhs, const S& rhs, const S& x) assert(lhs + rhs == x); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -36,7 +36,7 @@ test1(const typename S::value_type* lhs, S&& rhs, const S& x) assert(lhs + move(rhs) == x); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::string S; @@ -59,7 +59,7 @@ int main() test0("abcdefghijklmnopqrst", S("1234567890"), S("abcdefghijklmnopqrst1234567890")); test0("abcdefghijklmnopqrst", S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1("", S(""), S("")); test1("", S("12345"), S("12345")); @@ -78,5 +78,5 @@ int main() test1("abcdefghijklmnopqrst", S("1234567890"), S("abcdefghijklmnopqrst1234567890")); test1("abcdefghijklmnopqrst", S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp b/test/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp index b55252e68..d6cd5fa2f 100644 --- a/test/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp +++ b/test/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp @@ -27,7 +27,7 @@ test0(const S& lhs, typename S::value_type rhs, const S& x) assert(lhs + rhs == x); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -36,7 +36,7 @@ test1(S&& lhs, typename S::value_type rhs, const S& x) assert(move(lhs) + rhs == x); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::string S; @@ -47,12 +47,12 @@ int main() test0(S("abcdefghij"), '1', S("abcdefghij1")); test0(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1")); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1(S(""), '1', S("1")); test1(S("abcde"), '1', S("abcde1")); test1(S("abcdefghij"), '1', S("abcdefghij1")); test1(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1")); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp b/test/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp index afe67356c..c3046d461 100644 --- a/test/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp +++ b/test/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp @@ -27,7 +27,7 @@ test0(const S& lhs, const typename S::value_type* rhs, const S& x) assert(lhs + rhs == x); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -36,7 +36,7 @@ test1(S&& lhs, const typename S::value_type* rhs, const S& x) assert(move(lhs) + rhs == x); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::string S; @@ -59,7 +59,7 @@ int main() test0(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890")); test0(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890")); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1(S(""), "", S("")); test1(S(""), "12345", S("12345")); @@ -78,5 +78,5 @@ int main() test1(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890")); test1(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890")); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp b/test/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp index ef11400c4..aba731902 100644 --- a/test/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp +++ b/test/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp @@ -39,7 +39,7 @@ test0(const S& lhs, const S& rhs, const S& x) assert(lhs + rhs == x); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void @@ -62,7 +62,7 @@ test3(S&& lhs, S&& rhs, const S& x) assert(move(lhs) + move(rhs) == x); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES typedef std::string S; @@ -85,7 +85,7 @@ int main() test0(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890")); test0(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1(S(""), S(""), S("")); test1(S(""), S("12345"), S("12345")); @@ -138,5 +138,5 @@ int main() test3(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890")); test3(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890")); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.atomic_future/copy_assign.pass.cpp b/test/thread/futures/futures.atomic_future/copy_assign.pass.cpp index bd17f88d0..6c0bbd471 100644 --- a/test/thread/futures/futures.atomic_future/copy_assign.pass.cpp +++ b/test/thread/futures/futures.atomic_future/copy_assign.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise p; @@ -70,5 +70,5 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.promise/move_assign.pass.cpp b/test/thread/futures/futures.promise/move_assign.pass.cpp index 4d2283f90..f670fbe74 100644 --- a/test/thread/futures/futures.promise/move_assign.pass.cpp +++ b/test/thread/futures/futures.promise/move_assign.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(test_alloc_base::count == 0); { std::promise p0(std::allocator_arg, test_allocator()); @@ -85,5 +85,5 @@ int main() assert(test_alloc_base::count == 1); } assert(test_alloc_base::count == 0); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.promise/move_ctor.pass.cpp b/test/thread/futures/futures.promise/move_ctor.pass.cpp index caaaeebbf..c8228c229 100644 --- a/test/thread/futures/futures.promise/move_ctor.pass.cpp +++ b/test/thread/futures/futures.promise/move_ctor.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(test_alloc_base::count == 0); { std::promise p0(std::allocator_arg, test_allocator()); @@ -79,5 +79,5 @@ int main() assert(test_alloc_base::count == 1); } assert(test_alloc_base::count == 0); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.promise/set_rvalue.pass.cpp b/test/thread/futures/futures.promise/set_rvalue.pass.cpp index 50c587bcb..61a66ad40 100644 --- a/test/thread/futures/futures.promise/set_rvalue.pass.cpp +++ b/test/thread/futures/futures.promise/set_rvalue.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct A { @@ -26,11 +26,11 @@ struct A A(A&&) {throw 9;} }; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unique_ptr T; T i(new int(3)); @@ -63,5 +63,5 @@ int main() assert(j == 9); } } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp b/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp index 6a996de01..08ede45a7 100644 --- a/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp +++ b/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp @@ -17,23 +17,23 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void func(std::promise>& p) { p.set_value_at_thread_exit(std::unique_ptr(new int(5))); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::promise> p; std::future> f = p.get_future(); std::thread(func, std::move(p)).detach(); assert(*f.get() == 5); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.shared_future/copy_assign.pass.cpp b/test/thread/futures/futures.shared_future/copy_assign.pass.cpp index 04dc1f867..cf8d74b28 100644 --- a/test/thread/futures/futures.shared_future/copy_assign.pass.cpp +++ b/test/thread/futures/futures.shared_future/copy_assign.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise p; @@ -70,5 +70,5 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.shared_future/move_assign.pass.cpp b/test/thread/futures/futures.shared_future/move_assign.pass.cpp index 496bac5ae..a0802fc1a 100644 --- a/test/thread/futures/futures.shared_future/move_assign.pass.cpp +++ b/test/thread/futures/futures.shared_future/move_assign.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise p; @@ -70,5 +70,5 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.unique_future/copy_assign.fail.cpp b/test/thread/futures/futures.unique_future/copy_assign.fail.cpp index e3745cdac..a5f18a241 100644 --- a/test/thread/futures/futures.unique_future/copy_assign.fail.cpp +++ b/test/thread/futures/futures.unique_future/copy_assign.fail.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise p; @@ -70,5 +70,5 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.unique_future/move_assign.pass.cpp b/test/thread/futures/futures.unique_future/move_assign.pass.cpp index 4c5d462d5..d4b8f6d4c 100644 --- a/test/thread/futures/futures.unique_future/move_assign.pass.cpp +++ b/test/thread/futures/futures.unique_future/move_assign.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise p; @@ -70,5 +70,5 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/futures.unique_future/move_ctor.pass.cpp b/test/thread/futures/futures.unique_future/move_ctor.pass.cpp index dee66c59e..10501ac68 100644 --- a/test/thread/futures/futures.unique_future/move_ctor.pass.cpp +++ b/test/thread/futures/futures.unique_future/move_ctor.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int T; std::promise p; @@ -64,5 +64,5 @@ int main() assert(!f0.valid()); assert(!f.valid()); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/futures/test_allocator.h b/test/thread/futures/test_allocator.h index 94a80e2db..7644bc7c9 100644 --- a/test/thread/futures/test_allocator.h +++ b/test/thread/futures/test_allocator.h @@ -59,10 +59,10 @@ public: {return UINT_MAX / sizeof(T);} void construct(pointer p, const T& val) {::new(p) T(val);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void construct(pointer p, T&& val) {::new(p) T(std::move(val));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void destroy(pointer p) {p->~T();} friend bool operator==(const test_allocator& x, const test_allocator& y) diff --git a/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp b/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp index 125024ce0..33d93c9da 100644 --- a/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp +++ b/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp @@ -21,7 +21,7 @@ std::mutex m1; int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::unique_lock lk0(m0); std::unique_lock lk1(m1); lk1 = std::move(lk0); @@ -29,5 +29,5 @@ int main() assert(lk1.owns_lock() == true); assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp b/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp index 08cb78e64..fe44a457a 100644 --- a/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp +++ b/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_ctor.pass.cpp @@ -20,12 +20,12 @@ std::mutex m; int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::unique_lock lk0(m); std::unique_lock lk = std::move(lk0); assert(lk.mutex() == &m); assert(lk.owns_lock() == true); assert(lk0.mutex() == nullptr); assert(lk0.owns_lock() == false); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp b/test/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp index ff1cf57fd..a34723e7c 100644 --- a/test/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp +++ b/test/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp @@ -56,7 +56,7 @@ void f1() int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::set_terminate(f1); { assert(G::n_alive == 0); @@ -78,5 +78,5 @@ int main() t0 = std::move(t1); assert(false); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp b/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp index a28fd69f8..647ae5ed5 100644 --- a/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp +++ b/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp @@ -51,7 +51,7 @@ bool G::op_run = false; int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { assert(G::n_alive == 0); assert(!G::op_run); @@ -64,5 +64,5 @@ int main() assert(G::n_alive == 0); assert(G::op_run); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp index 000faa7f2..5a4c8f596 100644 --- a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp +++ b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp @@ -61,7 +61,7 @@ int A::count = 0; int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(new_called == 0); { std::function f = A(); @@ -77,5 +77,5 @@ int main() assert(f.target() == 0); assert(f.target() == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp index dc4b092d8..8f4471b09 100644 --- a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp +++ b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy.pass.cpp @@ -99,7 +99,7 @@ int main() assert(f2.target() == 0); assert(f2.target() == 0); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(new_called == 0); { std::function f = A(); @@ -115,5 +115,5 @@ int main() assert(f.target() == 0); assert(f.target() == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp index 1202914c3..a69c22fe3 100644 --- a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp +++ b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp @@ -102,7 +102,7 @@ int main() assert(f2.target() == 0); assert(f2.target() == 0); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(new_called == 0); { std::function f = A(); @@ -119,5 +119,5 @@ int main() assert(f.target() == 0); assert(f.target() == 0); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/test_allocator.h b/test/utilities/function.objects/func.wrap/func.wrap.func/test_allocator.h index 1c0f163d0..c5da7e639 100644 --- a/test/utilities/function.objects/func.wrap/func.wrap.func/test_allocator.h +++ b/test/utilities/function.objects/func.wrap/func.wrap.func/test_allocator.h @@ -59,10 +59,10 @@ public: {return UINT_MAX / sizeof(T);} void construct(pointer p, const T& val) {::new(p) T(val);} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void construct(pointer p, T&& val) {::new(p) T(std::move(val));} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void destroy(pointer p) {p->~T();} friend bool operator==(const test_allocator& x, const test_allocator& y) diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp index 19b81a8a5..6a1d85e26 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -108,5 +108,5 @@ int main() std::scoped_allocator_adaptor, A3>(A2(5), A3(6)))); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp index 49ea9c067..ee6e4bb93 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_copy.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> B; @@ -65,5 +65,5 @@ int main() assert(a2 == a1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp index 0db40da6b..e65a71876 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/converting_move.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> B; @@ -71,5 +71,5 @@ int main() assert(a2 == a1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp index 6db3d3a65..3cf15f252 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/copy.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -66,5 +66,5 @@ int main() assert(a2 == a1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp index 26dc7f551..7660f6ffa 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.cnstr/default.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -54,5 +54,5 @@ int main() assert(A3::move_called == false); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp index 1a433cfa4..228a01104 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -45,5 +45,5 @@ int main() assert(A1::allocate_called == true); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp index 43916cb0b..c4c76b0a7 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -66,5 +66,5 @@ int main() assert(a.allocate(10, (const void*)20) == (int*)20); assert(A2::allocate_called == true); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp index 56306f29c..44cfc1357 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp @@ -20,7 +20,7 @@ #include "../allocators.h" -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES struct B { @@ -111,11 +111,11 @@ struct F bool F::constructed = false; -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -189,5 +189,5 @@ int main() s->~S(); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp index 137d8011d..5688ce0e4 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -42,5 +42,5 @@ int main() assert((A1::deallocate_called == std::pair((int*)10, 20))); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp index 9201e16ea..12c415f6d 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/destroy.pass.cpp @@ -32,7 +32,7 @@ bool B::constructed = false; int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -66,5 +66,5 @@ int main() assert(A3::destroy_called); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp index 1eef5beed..8ff495070 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/inner_allocator.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -41,5 +41,5 @@ int main() std::scoped_allocator_adaptor, A3>(A2(6), A3(8)))); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp index 22655a363..cb94643a0 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/max_size.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -39,5 +39,5 @@ int main() assert(a.max_size() == 200); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp index 23ab0e599..0438869e8 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/outer_allocator.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -40,5 +40,5 @@ int main() assert(a.outer_allocator() == A1(5)); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp index a5d5b109b..ad69f7f6b 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; @@ -51,5 +51,5 @@ int main() assert(a2.inner_allocator().inner_allocator().outer_allocator().id() == -1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp index 416ac5241..5bcaed4bc 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/inner_allocator_type.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same< std::scoped_allocator_adaptor>::inner_allocator_type, @@ -35,5 +35,5 @@ int main() std::scoped_allocator_adaptor, A2, A3>::inner_allocator_type, std::scoped_allocator_adaptor, A3>>::value), ""); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp index 46ae7812e..9085980df 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_copy_assignment, @@ -35,5 +35,5 @@ int main() std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_copy_assignment, std::true_type>::value), ""); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp index 664c27bd7..0d1bf37da 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_move_assignment, @@ -35,5 +35,5 @@ int main() std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_move_assignment, std::true_type>::value), ""); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp index 585bd14bc..ca884cba7 100644 --- a/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/allocator.adaptor.types/propagate_on_container_swap.pass.cpp @@ -21,7 +21,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same< std::scoped_allocator_adaptor>::propagate_on_container_swap, @@ -35,5 +35,5 @@ int main() std::scoped_allocator_adaptor, A2, A3>::propagate_on_container_swap, std::true_type>::value), ""); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/allocator.adaptor/allocators.h b/test/utilities/memory/allocator.adaptor/allocators.h index 0e4b7f329..e5e0a1375 100644 --- a/test/utilities/memory/allocator.adaptor/allocators.h +++ b/test/utilities/memory/allocator.adaptor/allocators.h @@ -4,7 +4,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template class A1 @@ -169,6 +169,6 @@ bool operator!=(const A3& x, const A3& y) return !(x == y); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif // ALLOCATORS_H diff --git a/test/utilities/memory/allocator.adaptor/types.pass.cpp b/test/utilities/memory/allocator.adaptor/types.pass.cpp index 61a347f5f..fdc2b4f07 100644 --- a/test/utilities/memory/allocator.adaptor/types.pass.cpp +++ b/test/utilities/memory/allocator.adaptor/types.pass.cpp @@ -30,7 +30,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_base_of< A1, @@ -98,5 +98,5 @@ int main() std::scoped_allocator_adaptor, A1>::const_void_pointer, const void*>::value), ""); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp b/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp index c0bea0379..066d16843 100644 --- a/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp +++ b/test/utilities/memory/default.allocator/allocator.members/construct.pass.cpp @@ -52,23 +52,23 @@ int move_only_constructed = 0; class move_only { int data; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(const move_only&); move_only& operator=(const move_only&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&); move_only& operator=(move_only&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&&) {++move_only_constructed;} move_only& operator=(move_only&&) {} -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv () {return std::__rv(*this);} move_only(std::__rv) {++move_only_constructed;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only() {++move_only_constructed;} ~move_only() {--move_only_constructed;} diff --git a/test/utilities/memory/unique.ptr/deleter.h b/test/utilities/memory/unique.ptr/deleter.h index f14c74f87..cbba3b67a 100644 --- a/test/utilities/memory/unique.ptr/deleter.h +++ b/test/utilities/memory/unique.ptr/deleter.h @@ -24,16 +24,16 @@ class Deleter { int state_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&); Deleter& operator=(Deleter&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -41,7 +41,7 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv() {return std::__rv(*this);} Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} Deleter& operator=(std::__rv r) @@ -50,13 +50,13 @@ public: r->state_ = 0; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(0) {} explicit Deleter(int s) : state_(s) {} ~Deleter() {assert(state_ >= 0); state_ = -1;} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -66,12 +66,12 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter d, typename std::enable_if::value>::type* = 0) : state_(d.state()) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: int state() const {return state_;} void set_state(int i) {state_ = i;} @@ -84,16 +84,16 @@ class Deleter { int state_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&); Deleter& operator=(Deleter&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -101,7 +101,7 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv() {return std::__rv(*this);} Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} Deleter& operator=(std::__rv r) @@ -110,7 +110,7 @@ public: r->state_ = 0; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(0) {} explicit Deleter(int s) : state_(s) {} diff --git a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp index f3bcbcf23..61545a174 100644 --- a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp +++ b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move01.pass.cpp @@ -34,16 +34,16 @@ class Deleter { int state_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&); Deleter& operator=(Deleter&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -51,7 +51,7 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv() {return std::__rv(*this);} Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} Deleter& operator=(std::__rv r) @@ -60,11 +60,11 @@ public: r->state_ = 0; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(5) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -74,12 +74,12 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter d, typename std::enable_if::value>::type* = 0) : state_(d.state()) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: int state() const {return state_;} void set_state(int i) {state_ = i;} diff --git a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.pass.cpp b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.pass.cpp index e0d8c5acf..1ac885264 100644 --- a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.pass.cpp +++ b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move02.pass.cpp @@ -34,16 +34,16 @@ class Deleter { int state_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&); Deleter& operator=(Deleter&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -51,7 +51,7 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv() {return std::__rv(*this);} Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} Deleter& operator=(std::__rv r) @@ -60,11 +60,11 @@ public: r->state_ = 0; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(5) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -74,12 +74,12 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter d, typename std::enable_if::value>::type* = 0) : state_(d.state()) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: int state() const {return state_;} void set_state(int i) {state_ = i;} diff --git a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp index 1da66eaef..b343227f5 100644 --- a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp +++ b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert08.fail.cpp @@ -46,16 +46,16 @@ class Deleter { int state_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&); Deleter& operator=(Deleter&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -63,7 +63,7 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv() {return std::__rv(*this);} Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} Deleter& operator=(std::__rv r) @@ -72,11 +72,11 @@ public: r->state_ = 0; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(5) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -86,12 +86,12 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter d, typename std::enable_if::value>::type* = 0) : state_(d.state()) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: int state() const {return state_;} void set_state(int i) {state_ = i;} diff --git a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp index fe981de13..ce1f4d1d8 100644 --- a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp +++ b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/move_convert11.fail.cpp @@ -46,16 +46,16 @@ class Deleter { int state_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&); Deleter& operator=(Deleter&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -63,7 +63,7 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv() {return std::__rv(*this);} Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} Deleter& operator=(std::__rv r) @@ -72,11 +72,11 @@ public: r->state_ = 0; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(5) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -86,12 +86,12 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter d, typename std::enable_if::value>::type* = 0) : state_(d.state()) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: int state() const {return state_;} void set_state(int i) {state_ = i;} diff --git a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter01.pass.cpp b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter01.pass.cpp index 1faff8726..c0f4f56d2 100644 --- a/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter01.pass.cpp +++ b/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer_deleter01.pass.cpp @@ -33,16 +33,16 @@ class Deleter { int state_; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(const Deleter&); Deleter& operator=(const Deleter&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&); Deleter& operator=(Deleter&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter(Deleter&& r) : state_(r.state_) {r.state_ = 0;} Deleter& operator=(Deleter&& r) { @@ -50,7 +50,7 @@ public: r.state_ = 0; return *this; } -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv() {return std::__rv(*this);} Deleter(std::__rv r) : state_(r->state_) {r->state_ = 0;} Deleter& operator=(std::__rv r) @@ -59,11 +59,11 @@ public: r->state_ = 0; return *this; } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES Deleter() : state_(5) {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter&& d, typename std::enable_if::value>::type* = 0) @@ -73,12 +73,12 @@ private: template Deleter(const Deleter& d, typename std::enable_if::value>::type* = 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES template Deleter(Deleter d, typename std::enable_if::value>::type* = 0) : state_(d.state()) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: int state() const {return state_;} void set_state(int i) {state_ = i;} diff --git a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp index dcc594e13..7962ad31f 100644 --- a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp +++ b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp @@ -58,7 +58,7 @@ int main() { std::auto_ptr ptr(new A); A* raw_ptr = ptr.get(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::shared_ptr p(std::move(ptr)); #else std::shared_ptr p(ptr); @@ -76,7 +76,7 @@ int main() throw_next = true; try { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES std::shared_ptr p(std::move(ptr)); #else std::shared_ptr p(ptr); diff --git a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp index 7f9c142af..4ccad4e0a 100644 --- a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp +++ b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp @@ -66,24 +66,24 @@ int main() std::shared_ptr pB(std::move(pA)); assert(B::count == 1); assert(A::count == 1); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pB.use_count() == 1); assert(pA.use_count() == 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pB.use_count() == 2); assert(pA.use_count() == 2); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(p == pB.get()); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pA.use_count() == 0); assert(B::count == 0); assert(A::count == 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pA.use_count() == 1); assert(B::count == 1); assert(A::count == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } assert(B::count == 0); assert(A::count == 0); diff --git a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp index ae3faede9..4044afbf0 100644 --- a/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp +++ b/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_rv.pass.cpp @@ -37,22 +37,22 @@ int main() A* p = pA.get(); std::shared_ptr pA2(std::move(pA)); assert(A::count == 1); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pA.use_count() == 0); assert(pA2.use_count() == 1); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pA.use_count() == 2); assert(pA2.use_count() == 2); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pA2.get() == p); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pA.use_count() == 0); assert(A::count == 0); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES assert(pA.use_count() == 1); assert(A::count == 1); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } assert(A::count == 0); { diff --git a/test/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp b/test/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp index cbfb7f4d7..c1e2a23f6 100644 --- a/test/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp +++ b/test/utilities/meta/meta.trans/meta.trans.ref/add_rvalue_ref.pass.cpp @@ -13,7 +13,7 @@ #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template void test_add_rvalue_reference() @@ -21,11 +21,11 @@ void test_add_rvalue_reference() static_assert((std::is_same::type, U>::value), ""); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test_add_rvalue_reference(); test_add_rvalue_reference(); test_add_rvalue_reference(); @@ -33,5 +33,5 @@ int main() test_add_rvalue_reference(); test_add_rvalue_reference(); test_add_rvalue_reference(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp b/test/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp index b42b0b504..05246b1f1 100644 --- a/test/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp +++ b/test/utilities/meta/meta.trans/meta.trans.ref/remove_ref.pass.cpp @@ -33,11 +33,11 @@ int main() test_remove_reference(); test_remove_reference(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test_remove_reference(); test_remove_reference(); test_remove_reference(); test_remove_reference(); test_remove_reference(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp index 11600217a..c1e169668 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp @@ -33,8 +33,8 @@ void test_rvalue_ref() int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test_rvalue_ref(); test_rvalue_ref(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp index 62f997815..21bf3f449 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp @@ -27,8 +27,8 @@ void test_rvalue_ref() int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test_rvalue_ref(); test_rvalue_ref(); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/tuple/tuple.tuple/MoveOnly.h b/test/utilities/tuple/tuple.tuple/MoveOnly.h index c3468387e..cbf80201a 100644 --- a/test/utilities/tuple/tuple.tuple/MoveOnly.h +++ b/test/utilities/tuple/tuple.tuple/MoveOnly.h @@ -1,7 +1,7 @@ #ifndef MOVEONLY_H #define MOVEONLY_H -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #include @@ -36,6 +36,6 @@ struct hash } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif // MOVEONLY_H diff --git a/test/utilities/tuple/tuple.tuple/allocators.h b/test/utilities/tuple/tuple.tuple/allocators.h index 0e4b7f329..e5e0a1375 100644 --- a/test/utilities/tuple/tuple.tuple/allocators.h +++ b/test/utilities/tuple/tuple.tuple/allocators.h @@ -4,7 +4,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template class A1 @@ -169,6 +169,6 @@ bool operator!=(const A3& x, const A3& y) return !(x == y); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif // ALLOCATORS_H diff --git a/test/utilities/utility/declval/declval.pass.cpp b/test/utilities/utility/declval/declval.pass.cpp index ddeb67cd9..6c7350377 100644 --- a/test/utilities/utility/declval/declval.pass.cpp +++ b/test/utilities/utility/declval/declval.pass.cpp @@ -22,7 +22,7 @@ class A int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same()), A&&>::value), ""); #else static_assert((std::is_same()), A>::value), ""); diff --git a/test/utilities/utility/forward/forward.pass.cpp b/test/utilities/utility/forward/forward.pass.cpp index cfc800dc0..a323a7c8d 100644 --- a/test/utilities/utility/forward/forward.pass.cpp +++ b/test/utilities/utility/forward/forward.pass.cpp @@ -27,19 +27,19 @@ struct eight {one _[8];}; one test(A&); two test(const A&); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES four test(A&&); eight test(const A&&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { A a; const A ca = A(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert(sizeof(test(std::forward(a))) == 1, ""); static_assert(sizeof(test(std::forward(a))) == 4, ""); static_assert(sizeof(test(std::forward(source()))) == 4, ""); @@ -54,7 +54,7 @@ int main() static_assert(sizeof(test(std::forward(ca))) == 8, ""); static_assert(sizeof(test(std::forward(csource()))) == 8, ""); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert(sizeof(test(std::forward(a))) == 1, ""); static_assert(sizeof(test(std::forward(a))) == 1, ""); @@ -69,5 +69,5 @@ int main() static_assert(sizeof(test(std::forward(csource()))) == 2, ""); static_assert(sizeof(test(std::forward(ca))) == 2, ""); static_assert(sizeof(test(std::forward(csource()))) == 2, ""); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/utility/forward/move_copy.pass.cpp b/test/utilities/utility/forward/move_copy.pass.cpp index 6cc314891..c4feb1467 100644 --- a/test/utilities/utility/forward/move_copy.pass.cpp +++ b/test/utilities/utility/forward/move_copy.pass.cpp @@ -17,25 +17,25 @@ int move_ctor = 0; class A { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #else #endif public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES A(const A&) {++copy_ctor;} A& operator=(const A&); A(A&&) {++move_ctor;} A& operator=(A&&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES A(const A&) {++copy_ctor;} A& operator=(A&); operator std::__rv () {return std::__rv(*this);} A(std::__rv) {++move_ctor;} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES A() {} }; diff --git a/test/utilities/utility/forward/move_if_noexcept.pass.cpp b/test/utilities/utility/forward/move_if_noexcept.pass.cpp index 2c7718ae3..4a909eab7 100644 --- a/test/utilities/utility/forward/move_if_noexcept.pass.cpp +++ b/test/utilities/utility/forward/move_if_noexcept.pass.cpp @@ -27,7 +27,7 @@ class A public: A() {} -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES A(A&&) {} #endif }; @@ -40,16 +40,16 @@ int main() A a; const A ca; -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/utility/forward/move_only.pass.cpp b/test/utilities/utility/forward/move_only.pass.cpp index 56cba6fa1..3da7a1f33 100644 --- a/test/utilities/utility/forward/move_only.pass.cpp +++ b/test/utilities/utility/forward/move_only.pass.cpp @@ -14,23 +14,23 @@ class move_only { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(const move_only&); move_only& operator=(const move_only&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&); move_only& operator=(move_only&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&&) {} move_only& operator=(move_only&&) {} -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv () {return std::__rv(*this);} move_only(std::__rv) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only() {} }; diff --git a/test/utilities/utility/forward/move_only1.fail.cpp b/test/utilities/utility/forward/move_only1.fail.cpp index a6dbc7898..6e5c2a595 100644 --- a/test/utilities/utility/forward/move_only1.fail.cpp +++ b/test/utilities/utility/forward/move_only1.fail.cpp @@ -17,23 +17,23 @@ class move_only { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(const move_only&); move_only& operator=(const move_only&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&); move_only& operator=(move_only&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&&) {} move_only& operator=(move_only&&) {} -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv () {return std::__rv(*this);} move_only(std::__rv) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only() {} }; diff --git a/test/utilities/utility/forward/move_only2.fail.cpp b/test/utilities/utility/forward/move_only2.fail.cpp index 2058d8481..f219b6d35 100644 --- a/test/utilities/utility/forward/move_only2.fail.cpp +++ b/test/utilities/utility/forward/move_only2.fail.cpp @@ -17,23 +17,23 @@ class move_only { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(const move_only&); move_only& operator=(const move_only&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&); move_only& operator=(move_only&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&&) {} move_only& operator=(move_only&&) {} -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv () {return std::__rv(*this);} move_only(std::__rv) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only() {} }; diff --git a/test/utilities/utility/forward/move_only3.fail.cpp b/test/utilities/utility/forward/move_only3.fail.cpp index 331f59f8f..5b17f59bc 100644 --- a/test/utilities/utility/forward/move_only3.fail.cpp +++ b/test/utilities/utility/forward/move_only3.fail.cpp @@ -14,23 +14,23 @@ class move_only { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(const move_only&); move_only& operator=(const move_only&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&); move_only& operator=(move_only&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&&) {} move_only& operator=(move_only&&) {} -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv () {return std::__rv(*this);} move_only(std::__rv) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only() {} }; diff --git a/test/utilities/utility/forward/move_only4.fail.cpp b/test/utilities/utility/forward/move_only4.fail.cpp index 99135b704..801ee42f5 100644 --- a/test/utilities/utility/forward/move_only4.fail.cpp +++ b/test/utilities/utility/forward/move_only4.fail.cpp @@ -17,23 +17,23 @@ class move_only { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(const move_only&); move_only& operator=(const move_only&); -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&); move_only& operator=(move_only&); -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES public: -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only(move_only&&) {} move_only& operator=(move_only&&) {} -#else // _LIBCPP_MOVE +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES operator std::__rv () {return std::__rv(*this);} move_only(std::__rv) {} -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES move_only() {} }; diff --git a/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp b/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp index 814313bc6..80cd2668b 100644 --- a/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp +++ b/test/utilities/utility/pairs/pairs.pair/U_V.pass.cpp @@ -19,12 +19,12 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short*> P; P p(std::unique_ptr(new int(3)), nullptr); assert(*p.first == 3); assert(p.second == nullptr); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp b/test/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp index 42ded4c56..f5524de26 100644 --- a/test/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp +++ b/test/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short> P; P p1(std::unique_ptr(new int(3)), 4); @@ -28,5 +28,5 @@ int main() assert(*p2.first == 3); assert(p2.second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp b/test/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp index 787f54b02..f9cc83a9b 100644 --- a/test/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp +++ b/test/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp @@ -29,7 +29,7 @@ struct Derived int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short> P1; typedef std::pair, long> P2; @@ -39,5 +39,5 @@ int main() assert(p2.first == nullptr); assert(p2.second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/utility/pairs/pairs.pair/make_pair.pass.cpp b/test/utilities/utility/pairs/pairs.pair/make_pair.pass.cpp index b38655d36..81b8bbc8b 100644 --- a/test/utilities/utility/pairs/pairs.pair/make_pair.pass.cpp +++ b/test/utilities/utility/pairs/pairs.pair/make_pair.pass.cpp @@ -23,7 +23,7 @@ int main() assert(p1.first == 3); assert(p1.second == 4); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short> P1; P1 p1 = std::make_pair(std::unique_ptr(new int(3)), 4); @@ -36,5 +36,5 @@ int main() assert(p1.first == nullptr); assert(p1.second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp b/test/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp index f34fa9cb9..19325254a 100644 --- a/test/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp +++ b/test/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp @@ -29,7 +29,7 @@ struct Derived int main() { -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair, short> P1; typedef std::pair, long> P2; @@ -38,5 +38,5 @@ int main() assert(p2.first == nullptr); assert(p2.second == 4); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/utilities/utility/utility.swap/swap.pass.cpp b/test/utilities/utility/utility.swap/swap.pass.cpp index 067fb1905..e0c09b34b 100644 --- a/test/utilities/utility/utility.swap/swap.pass.cpp +++ b/test/utilities/utility/utility.swap/swap.pass.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -30,7 +30,7 @@ test() assert(j == 1); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void test1() @@ -42,12 +42,12 @@ test1() assert(*j == 1); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1(); #endif } diff --git a/test/utilities/utility/utility.swap/swap_array.pass.cpp b/test/utilities/utility/utility.swap/swap_array.pass.cpp index 28d4dca7e..6892b609f 100644 --- a/test/utilities/utility/utility.swap/swap_array.pass.cpp +++ b/test/utilities/utility/utility.swap/swap_array.pass.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include #endif @@ -34,7 +34,7 @@ test() assert(j[2] == 3); } -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES void test1() @@ -54,12 +54,12 @@ test1() assert(*j[2] == 3); } -#endif // _LIBCPP_MOVE +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES int main() { test(); -#ifdef _LIBCPP_MOVE +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES test1(); #endif }