From afa7a957bd6ebe0ded8f74accd964b5a9967dc5b Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 19 Apr 2017 01:23:04 +0000 Subject: [PATCH] Cleanup remaining _LIBCPP_HAS_NO_ usages in container headers llvm-svn: 300643 --- libcxx/include/__hash_table | 6 ++---- libcxx/include/__split_buffer | 26 ++++++++++---------------- libcxx/include/__tree | 8 ++++---- libcxx/include/ext/hash_map | 6 +++--- 4 files changed, 19 insertions(+), 27 deletions(-) diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index a20cbb8ed08b..acdc443a640a 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -798,8 +798,7 @@ public: _NOEXCEPT_(is_nothrow_copy_constructible::value) : __data_(__size, __a) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __bucket_list_deallocator(__bucket_list_deallocator&& __x) _NOEXCEPT_(is_nothrow_move_constructible::value) @@ -807,8 +806,7 @@ public: { __x.size() = 0; } - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif _LIBCPP_INLINE_VISIBILITY size_type& size() _NOEXCEPT {return __data_.first();} diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer index e74cf1f3b772..72073f024cd2 100644 --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -66,7 +66,7 @@ public: __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a); ~__split_buffer(); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG __split_buffer(__split_buffer&& __c) _NOEXCEPT_(is_nothrow_move_constructible::value); __split_buffer(__split_buffer&& __c, const __alloc_rr& __a); @@ -74,7 +74,7 @@ public: _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable::value) || !__alloc_traits::propagate_on_container_move_assignment::value); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT {return __begin_;} _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;} @@ -99,14 +99,12 @@ public: void shrink_to_fit() _NOEXCEPT; void push_front(const_reference __x); _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x); -#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) +#ifndef _LIBCPP_CXX03_LANG void push_front(value_type&& __x); void push_back(value_type&& __x); -#if !defined(_LIBCPP_HAS_NO_VARIADICS) template void emplace_back(_Args&&... __args); -#endif // !defined(_LIBCPP_HAS_NO_VARIADICS) -#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) +#endif // !defined(_LIBCPP_CXX03_LANG) _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);} _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);} @@ -343,7 +341,7 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer() __alloc_traits::deallocate(__alloc(), __first_, capacity()); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c) @@ -405,7 +403,7 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template void @@ -492,7 +490,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x) --__begin_; } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template void @@ -524,7 +522,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) --__begin_; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template inline _LIBCPP_INLINE_VISIBILITY @@ -556,7 +554,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x) ++__end_; } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template void @@ -588,8 +586,6 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x) ++__end_; } -#ifndef _LIBCPP_HAS_NO_VARIADICS - template template void @@ -621,9 +617,7 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args) ++__end_; } -#endif // _LIBCPP_HAS_NO_VARIADICS - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template inline _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 2161c6cb79d1..6771589bbc68 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -1105,7 +1105,7 @@ public: void __assign_unique(_InputIterator __first, _InputIterator __last); template void __assign_multi(_InputIterator __first, _InputIterator __last); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG __tree(__tree&& __t) _NOEXCEPT_( is_nothrow_move_constructible<__node_allocator>::value && @@ -1116,7 +1116,7 @@ public: __node_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable::value && is_nothrow_move_assignable<__node_allocator>::value); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG ~__tree(); @@ -1675,7 +1675,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t) __begin_node() = __end_node(); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) @@ -1805,7 +1805,7 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template __tree<_Tp, _Compare, _Allocator>::~__tree() diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map index fab36a155bac..66f2b11c0594 100644 --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -331,7 +331,7 @@ public: __second_constructed(false) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __hash_map_node_destructor(__hash_node_destructor&& __x) : __na_(__x.__na_), @@ -340,7 +340,7 @@ public: { __x.__value_constructed = false; } -#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#else // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY __hash_map_node_destructor(const __hash_node_destructor& __x) : __na_(__x.__na_), @@ -349,7 +349,7 @@ public: { const_cast(__x.__value_constructed) = false; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY void operator()(pointer __p)