[libc++] Remove some workarounds for C++03

We don't support any compiler that doesn't support variadics and rvalue
references in C++03 mode, so these workarounds can be dropped. There's
still *a lot* of cruft related to these workarounds, but I try to tackle
a bit of it here and there.
This commit is contained in:
Louis Dionne 2020-10-09 12:33:49 -04:00
parent 0689dab844
commit 12805513a6
7 changed files with 3 additions and 267 deletions

View File

@ -34,19 +34,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Key, class _Tp> template <class _Key, class _Tp>
struct __hash_value_type; struct __hash_value_type;
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp> template <class _Tp>
struct __is_hash_value_type_imp : false_type {}; struct __is_hash_value_type_imp : false_type {};
template <class _Key, class _Value> template <class _Key, class _Value>
struct __is_hash_value_type_imp<__hash_value_type<_Key, _Value>> : true_type {}; struct __is_hash_value_type_imp<__hash_value_type<_Key, _Value> > : true_type {};
template <class ..._Args> template <class ..._Args>
struct __is_hash_value_type : false_type {}; struct __is_hash_value_type : false_type {};
template <class _One> template <class _One>
struct __is_hash_value_type<_One> : __is_hash_value_type_imp<typename __uncvref<_One>::type> {}; struct __is_hash_value_type<_One> : __is_hash_value_type_imp<typename __uncvref<_One>::type> {};
#endif
_LIBCPP_FUNC_VIS _LIBCPP_FUNC_VIS
size_t __next_prime(size_t __n); size_t __next_prime(size_t __n);
@ -155,12 +153,10 @@ struct __hash_key_value_types {
static __container_value_type* __get_ptr(__node_value_type& __n) { static __container_value_type* __get_ptr(__node_value_type& __n) {
return _VSTD::addressof(__n); return _VSTD::addressof(__n);
} }
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
static __container_value_type&& __move(__node_value_type& __v) { static __container_value_type&& __move(__node_value_type& __v) {
return _VSTD::move(__v); return _VSTD::move(__v);
} }
#endif
}; };
template <class _Key, class _Tp> template <class _Key, class _Tp>
@ -197,13 +193,10 @@ struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > {
static __container_value_type* __get_ptr(__node_value_type& __n) { static __container_value_type* __get_ptr(__node_value_type& __n) {
return _VSTD::addressof(__n.__get_value()); return _VSTD::addressof(__n.__get_value());
} }
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) { static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) {
return __v.__move(); return __v.__move();
} }
#endif
}; };
template <class _Tp, class _AllocPtr, class _KVTypes = __hash_key_value_types<_Tp>, template <class _Tp, class _AllocPtr, class _KVTypes = __hash_key_value_types<_Tp>,
@ -795,7 +788,6 @@ public:
_NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value) _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
: __data_(__size, __a) {} : __data_(__size, __a) {}
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
__bucket_list_deallocator(__bucket_list_deallocator&& __x) __bucket_list_deallocator(__bucket_list_deallocator&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value) _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
@ -803,7 +795,6 @@ public:
{ {
__x.size() = 0; __x.size() = 0;
} }
#endif
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
size_type& size() _NOEXCEPT {return __data_.first();} size_type& size() _NOEXCEPT {return __data_.first();}
@ -1019,7 +1010,6 @@ public:
explicit __hash_table(const allocator_type& __a); explicit __hash_table(const allocator_type& __a);
__hash_table(const __hash_table& __u); __hash_table(const __hash_table& __u);
__hash_table(const __hash_table& __u, const allocator_type& __a); __hash_table(const __hash_table& __u, const allocator_type& __a);
#ifndef _LIBCPP_CXX03_LANG
__hash_table(__hash_table&& __u) __hash_table(__hash_table&& __u)
_NOEXCEPT_( _NOEXCEPT_(
is_nothrow_move_constructible<__bucket_list>::value && is_nothrow_move_constructible<__bucket_list>::value &&
@ -1028,11 +1018,9 @@ public:
is_nothrow_move_constructible<hasher>::value && is_nothrow_move_constructible<hasher>::value &&
is_nothrow_move_constructible<key_equal>::value); is_nothrow_move_constructible<key_equal>::value);
__hash_table(__hash_table&& __u, const allocator_type& __a); __hash_table(__hash_table&& __u, const allocator_type& __a);
#endif // _LIBCPP_CXX03_LANG
~__hash_table(); ~__hash_table();
__hash_table& operator=(const __hash_table& __u); __hash_table& operator=(const __hash_table& __u);
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
__hash_table& operator=(__hash_table&& __u) __hash_table& operator=(__hash_table&& __u)
_NOEXCEPT_( _NOEXCEPT_(
@ -1040,7 +1028,6 @@ public:
is_nothrow_move_assignable<__node_allocator>::value && is_nothrow_move_assignable<__node_allocator>::value &&
is_nothrow_move_assignable<hasher>::value && is_nothrow_move_assignable<hasher>::value &&
is_nothrow_move_assignable<key_equal>::value); is_nothrow_move_assignable<key_equal>::value);
#endif
template <class _InputIterator> template <class _InputIterator>
void __assign_unique(_InputIterator __first, _InputIterator __last); void __assign_unique(_InputIterator __first, _InputIterator __last);
template <class _InputIterator> template <class _InputIterator>
@ -1078,7 +1065,6 @@ public:
iterator __node_insert_multi(const_iterator __p, iterator __node_insert_multi(const_iterator __p,
__node_pointer __nd); __node_pointer __nd);
#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class ..._Args> template <class _Key, class ..._Args>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __emplace_unique_key_args(_Key const& __k, _Args&&... __args); pair<iterator, bool> __emplace_unique_key_args(_Key const& __k, _Args&&... __args);
@ -1163,15 +1149,6 @@ public:
return __emplace_hint_multi(__p, _VSTD::forward<_Pp>(__x)); return __emplace_hint_multi(__p, _VSTD::forward<_Pp>(__x));
} }
#else // !defined(_LIBCPP_CXX03_LANG)
template <class _Key, class _Args>
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __emplace_unique_key_args(_Key const&, _Args& __args);
iterator __insert_multi(const __container_value_type& __x);
iterator __insert_multi(const_iterator __p, const __container_value_type& __x);
#endif
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __insert_unique(const __container_value_type& __x) { pair<iterator, bool> __insert_unique(const __container_value_type& __x) {
return __emplace_unique_key_args(_NodeTypes::__get_key(__x), __x); return __emplace_unique_key_args(_NodeTypes::__get_key(__x), __x);
@ -1365,16 +1342,11 @@ public:
private: private:
void __rehash(size_type __n); void __rehash(size_type __n);
#ifndef _LIBCPP_CXX03_LANG
template <class ..._Args> template <class ..._Args>
__node_holder __construct_node(_Args&& ...__args); __node_holder __construct_node(_Args&& ...__args);
template <class _First, class ..._Rest> template <class _First, class ..._Rest>
__node_holder __construct_node_hash(size_t __hash, _First&& __f, _Rest&&... __rest); __node_holder __construct_node_hash(size_t __hash, _First&& __f, _Rest&&... __rest);
#else // _LIBCPP_CXX03_LANG
__node_holder __construct_node(const __container_value_type& __v);
__node_holder __construct_node_hash(size_t __hash, const __container_value_type& __v);
#endif
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
@ -1385,7 +1357,6 @@ private:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
void __copy_assign_alloc(const __hash_table&, false_type) {} void __copy_assign_alloc(const __hash_table&, false_type) {}
#ifndef _LIBCPP_CXX03_LANG
void __move_assign(__hash_table& __u, false_type); void __move_assign(__hash_table& __u, false_type);
void __move_assign(__hash_table& __u, true_type) void __move_assign(__hash_table& __u, true_type)
_NOEXCEPT_( _NOEXCEPT_(
@ -1412,7 +1383,6 @@ private:
} }
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {} void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {}
#endif // _LIBCPP_CXX03_LANG
void __deallocate_node(__next_pointer __np) _NOEXCEPT; void __deallocate_node(__next_pointer __np) _NOEXCEPT;
__next_pointer __detach() _NOEXCEPT; __next_pointer __detach() _NOEXCEPT;
@ -1489,8 +1459,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u,
{ {
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u) __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
_NOEXCEPT_( _NOEXCEPT_(
@ -1538,8 +1506,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
} }
} }
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() __hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table()
{ {
@ -1630,8 +1596,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach() _NOEXCEPT
return __cache; return __cache;
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
void void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign( __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
@ -1726,8 +1690,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u)
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _InputIterator> template <class _InputIterator>
void void
@ -2101,17 +2063,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key, class ..._Args> template <class _Key, class ..._Args>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool> pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args) __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args)
#else
template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key, class _Args>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& __k, _Args& __args)
#endif
{ {
size_t __hash = hash_function()(__k); size_t __hash = hash_function()(__k);
@ -2135,11 +2090,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const&
} }
} }
{ {
#ifndef _LIBCPP_CXX03_LANG
__node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...); __node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...);
#else
__node_holder __h = __construct_node_hash(__hash, __args);
#endif
if (size()+1 > __bc * max_load_factor() || __bc == 0) if (size()+1 > __bc * max_load_factor() || __bc == 0)
{ {
rehash(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc), rehash(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
@ -2178,8 +2129,6 @@ __done:
#endif #endif
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class... _Args> template <class... _Args>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool> pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
@ -2220,36 +2169,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
return __r; return __r;
} }
#else // _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const __container_value_type& __x)
{
__node_holder __h = __construct_node(__x);
iterator __r = __node_insert_multi(__h.get());
__h.release();
return __r;
}
template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p,
const __container_value_type& __x)
{
#if _LIBCPP_DEBUG_LEVEL == 2
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
"unordered container::insert(const_iterator, lvalue) called with an iterator not"
" referring to this unordered container");
#endif
__node_holder __h = __construct_node(__x);
iterator __r = __node_insert_multi(__p, __h.get());
__h.release();
return __r;
}
#endif // _LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 14 #if _LIBCPP_STD_VER > 14
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle, class _InsertReturnType> template <class _NodeHandle, class _InsertReturnType>
@ -2525,8 +2444,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const
return end(); return end();
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class ..._Args> template <class ..._Args>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
@ -2562,37 +2479,6 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(
return __h; return __h;
} }
#else // _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const __container_value_type& __v)
{
__node_allocator& __na = __node_alloc();
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
__node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), __v);
__h.get_deleter().__value_constructed = true;
__h->__hash_ = hash_function()(__h->__value_);
__h->__next_ = nullptr;
return __h;
}
template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(size_t __hash,
const __container_value_type& __v)
{
__node_allocator& __na = __node_alloc();
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
__node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), __v);
__h.get_deleter().__value_constructed = true;
__h->__hash_ = __hash;
__h->__next_ = nullptr;
return __h;
}
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Hash, class _Equal, class _Alloc> template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p) __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p)

View File

@ -146,7 +146,6 @@ private:
unique_lock& operator=(unique_lock const&); // = delete; unique_lock& operator=(unique_lock const&); // = delete;
public: public:
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
unique_lock(unique_lock&& __u) _NOEXCEPT unique_lock(unique_lock&& __u) _NOEXCEPT
: __m_(__u.__m_), __owns_(__u.__owns_) : __m_(__u.__m_), __owns_(__u.__owns_)
@ -163,8 +162,6 @@ public:
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
void lock(); void lock();
bool try_lock(); bool try_lock();

View File

@ -68,7 +68,6 @@ public:
__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a); __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
~__split_buffer(); ~__split_buffer();
#ifndef _LIBCPP_CXX03_LANG
__split_buffer(__split_buffer&& __c) __split_buffer(__split_buffer&& __c)
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value); _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
__split_buffer(__split_buffer&& __c, const __alloc_rr& __a); __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
@ -76,7 +75,6 @@ public:
_NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value && _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value) || is_nothrow_move_assignable<allocator_type>::value) ||
!__alloc_traits::propagate_on_container_move_assignment::value); !__alloc_traits::propagate_on_container_move_assignment::value);
#endif // _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT {return __begin_;} _LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT {return __begin_;}
_LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;} _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;}
@ -101,12 +99,10 @@ public:
void shrink_to_fit() _NOEXCEPT; void shrink_to_fit() _NOEXCEPT;
void push_front(const_reference __x); void push_front(const_reference __x);
_LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x); _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
#ifndef _LIBCPP_CXX03_LANG
void push_front(value_type&& __x); void push_front(value_type&& __x);
void push_back(value_type&& __x); void push_back(value_type&& __x);
template <class... _Args> template <class... _Args>
void emplace_back(_Args&&... __args); void emplace_back(_Args&&... __args);
#endif // !defined(_LIBCPP_CXX03_LANG)
_LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);} _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
_LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);} _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
@ -350,8 +346,6 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer()
__alloc_traits::deallocate(__alloc(), __first_, capacity()); __alloc_traits::deallocate(__alloc(), __first_, capacity());
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator> template <class _Tp, class _Allocator>
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c) __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value) _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
@ -412,8 +406,6 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator> template <class _Tp, class _Allocator>
void void
__split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x) __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
@ -499,8 +491,6 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
--__begin_; --__begin_;
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator> template <class _Tp, class _Allocator>
void void
__split_buffer<_Tp, _Allocator>::push_front(value_type&& __x) __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
@ -531,8 +521,6 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
--__begin_; --__begin_;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator> template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
void void
@ -563,8 +551,6 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
++__end_; ++__end_;
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator> template <class _Tp, class _Allocator>
void void
__split_buffer<_Tp, _Allocator>::push_back(value_type&& __x) __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
@ -626,8 +612,6 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
++__end_; ++__end_;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator> template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
void void

View File

@ -533,19 +533,17 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
// node traits // node traits
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp> template <class _Tp>
struct __is_tree_value_type_imp : false_type {}; struct __is_tree_value_type_imp : false_type {};
template <class _Key, class _Value> template <class _Key, class _Value>
struct __is_tree_value_type_imp<__value_type<_Key, _Value>> : true_type {}; struct __is_tree_value_type_imp<__value_type<_Key, _Value> > : true_type {};
template <class ..._Args> template <class ..._Args>
struct __is_tree_value_type : false_type {}; struct __is_tree_value_type : false_type {};
template <class _One> template <class _One>
struct __is_tree_value_type<_One> : __is_tree_value_type_imp<typename __uncvref<_One>::type> {}; struct __is_tree_value_type<_One> : __is_tree_value_type_imp<typename __uncvref<_One>::type> {};
#endif
template <class _Tp> template <class _Tp>
struct __tree_key_value_types { struct __tree_key_value_types {
@ -566,12 +564,10 @@ struct __tree_key_value_types {
static __container_value_type* __get_ptr(__node_value_type& __n) { static __container_value_type* __get_ptr(__node_value_type& __n) {
return _VSTD::addressof(__n); return _VSTD::addressof(__n);
} }
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
static __container_value_type&& __move(__node_value_type& __v) { static __container_value_type&& __move(__node_value_type& __v) {
return _VSTD::move(__v); return _VSTD::move(__v);
} }
#endif
}; };
template <class _Key, class _Tp> template <class _Key, class _Tp>
@ -616,12 +612,10 @@ struct __tree_key_value_types<__value_type<_Key, _Tp> > {
return _VSTD::addressof(__n.__get_value()); return _VSTD::addressof(__n.__get_value());
} }
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) { static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) {
return __v.__move(); return __v.__move();
} }
#endif
}; };
template <class _VoidPtr> template <class _VoidPtr>
@ -1103,7 +1097,6 @@ public:
void __assign_unique(_ForwardIterator __first, _ForwardIterator __last); void __assign_unique(_ForwardIterator __first, _ForwardIterator __last);
template <class _InputIterator> template <class _InputIterator>
void __assign_multi(_InputIterator __first, _InputIterator __last); void __assign_multi(_InputIterator __first, _InputIterator __last);
#ifndef _LIBCPP_CXX03_LANG
__tree(__tree&& __t) __tree(__tree&& __t)
_NOEXCEPT_( _NOEXCEPT_(
is_nothrow_move_constructible<__node_allocator>::value && is_nothrow_move_constructible<__node_allocator>::value &&
@ -1114,8 +1107,6 @@ public:
__node_traits::propagate_on_container_move_assignment::value && __node_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<value_compare>::value && is_nothrow_move_assignable<value_compare>::value &&
is_nothrow_move_assignable<__node_allocator>::value); is_nothrow_move_assignable<__node_allocator>::value);
#endif // _LIBCPP_CXX03_LANG
~__tree(); ~__tree();
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
@ -1146,7 +1137,6 @@ public:
_NOEXCEPT_(__is_nothrow_swappable<value_compare>::value); _NOEXCEPT_(__is_nothrow_swappable<value_compare>::value);
#endif #endif
#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class ..._Args> template <class _Key, class ..._Args>
pair<iterator, bool> pair<iterator, bool>
__emplace_unique_key_args(_Key const&, _Args&&... __args); __emplace_unique_key_args(_Key const&, _Args&&... __args);
@ -1255,15 +1245,6 @@ public:
return __emplace_hint_unique_key_args(__p, __x.first, _VSTD::forward<_Pp>(__x)).first; return __emplace_hint_unique_key_args(__p, __x.first, _VSTD::forward<_Pp>(__x)).first;
} }
#else
template <class _Key, class _Args>
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __emplace_unique_key_args(_Key const&, _Args& __args);
template <class _Key, class _Args>
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __emplace_hint_unique_key_args(const_iterator, _Key const&, _Args&);
#endif
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __insert_unique(const __container_value_type& __v) { pair<iterator, bool> __insert_unique(const __container_value_type& __v) {
return __emplace_unique_key_args(_NodeTypes::__get_key(__v), __v); return __emplace_unique_key_args(_NodeTypes::__get_key(__v), __v);
@ -1274,12 +1255,6 @@ public:
return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), __v).first; return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), __v).first;
} }
#ifdef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
iterator __insert_multi(const __container_value_type& __v);
_LIBCPP_INLINE_VISIBILITY
iterator __insert_multi(const_iterator __p, const __container_value_type& __v);
#else
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __insert_unique(__container_value_type&& __v) { pair<iterator, bool> __insert_unique(__container_value_type&& __v) {
return __emplace_unique_key_args(_NodeTypes::__get_key(__v), _VSTD::move(__v)); return __emplace_unique_key_args(_NodeTypes::__get_key(__v), _VSTD::move(__v));
@ -1332,8 +1307,6 @@ public:
return __emplace_hint_multi(__p, _VSTD::forward<_Vp>(__v)); return __emplace_hint_multi(__p, _VSTD::forward<_Vp>(__v));
} }
#endif // !_LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __node_assign_unique(const __container_value_type& __v, __node_pointer __dest); pair<iterator, bool> __node_assign_unique(const __container_value_type& __v, __node_pointer __dest);
@ -1471,12 +1444,8 @@ private:
__node_base_pointer& __dummy, __node_base_pointer& __dummy,
const _Key& __v); const _Key& __v);
#ifndef _LIBCPP_CXX03_LANG
template <class ..._Args> template <class ..._Args>
__node_holder __construct_node(_Args&& ...__args); __node_holder __construct_node(_Args&& ...__args);
#else
__node_holder __construct_node(const __container_value_type& __v);
#endif
void destroy(__node_pointer __nd) _NOEXCEPT; void destroy(__node_pointer __nd) _NOEXCEPT;
@ -1706,8 +1675,6 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
__begin_node() = __end_node(); __begin_node() = __end_node();
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Compare, class _Allocator> template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
_NOEXCEPT_( _NOEXCEPT_(
@ -1814,8 +1781,6 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t)
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Compare, class _Allocator> template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::~__tree() __tree<_Tp, _Compare, _Allocator>::~__tree()
{ {
@ -2117,17 +2082,10 @@ void __tree<_Tp, _Compare, _Allocator>::__insert_node_at(
++size(); ++size();
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Compare, class _Allocator> template <class _Tp, class _Compare, class _Allocator>
template <class _Key, class... _Args> template <class _Key, class... _Args>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args) __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args)
#else
template <class _Tp, class _Compare, class _Allocator>
template <class _Key, class _Args>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _Args& __args)
#endif
{ {
__parent_pointer __parent; __parent_pointer __parent;
__node_base_pointer& __child = __find_equal(__parent, __k); __node_base_pointer& __child = __find_equal(__parent, __k);
@ -2135,11 +2093,7 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _A
bool __inserted = false; bool __inserted = false;
if (__child == nullptr) if (__child == nullptr)
{ {
#ifndef _LIBCPP_CXX03_LANG
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
#else
__node_holder __h = __construct_node(__args);
#endif
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
__r = __h.release(); __r = __h.release();
__inserted = true; __inserted = true;
@ -2147,19 +2101,11 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _A
return pair<iterator, bool>(iterator(__r), __inserted); return pair<iterator, bool>(iterator(__r), __inserted);
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Compare, class _Allocator> template <class _Tp, class _Compare, class _Allocator>
template <class _Key, class... _Args> template <class _Key, class... _Args>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args( __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args(
const_iterator __p, _Key const& __k, _Args&&... __args) const_iterator __p, _Key const& __k, _Args&&... __args)
#else
template <class _Tp, class _Compare, class _Allocator>
template <class _Key, class _Args>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args(
const_iterator __p, _Key const& __k, _Args& __args)
#endif
{ {
__parent_pointer __parent; __parent_pointer __parent;
__node_base_pointer __dummy; __node_base_pointer __dummy;
@ -2168,11 +2114,7 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args(
bool __inserted = false; bool __inserted = false;
if (__child == nullptr) if (__child == nullptr)
{ {
#ifndef _LIBCPP_CXX03_LANG
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
#else
__node_holder __h = __construct_node(__args);
#endif
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
__r = __h.release(); __r = __h.release();
__inserted = true; __inserted = true;
@ -2180,8 +2122,6 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args(
return pair<iterator, bool>(iterator(__r), __inserted); return pair<iterator, bool>(iterator(__r), __inserted);
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Compare, class _Allocator> template <class _Tp, class _Compare, class _Allocator>
template <class ..._Args> template <class ..._Args>
typename __tree<_Tp, _Compare, _Allocator>::__node_holder typename __tree<_Tp, _Compare, _Allocator>::__node_holder
@ -2259,46 +2199,6 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p,
return iterator(static_cast<__node_pointer>(__h.release())); return iterator(static_cast<__node_pointer>(__h.release()));
} }
#else // _LIBCPP_CXX03_LANG
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node_holder
__tree<_Tp, _Compare, _Allocator>::__construct_node(const __container_value_type& __v)
{
__node_allocator& __na = __node_alloc();
__node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
__node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), __v);
__h.get_deleter().__value_constructed = true;
return __h;
}
#endif // _LIBCPP_CXX03_LANG
#ifdef _LIBCPP_CXX03_LANG
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__insert_multi(const __container_value_type& __v)
{
__parent_pointer __parent;
__node_base_pointer& __child = __find_leaf_high(__parent, _NodeTypes::__get_key(__v));
__node_holder __h = __construct_node(__v);
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
return iterator(__h.release());
}
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const __container_value_type& __v)
{
__parent_pointer __parent;
__node_base_pointer& __child = __find_leaf(__p, __parent, _NodeTypes::__get_key(__v));
__node_holder __h = __construct_node(__v);
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
return iterator(__h.release());
}
#endif
template <class _Tp, class _Compare, class _Allocator> template <class _Tp, class _Compare, class _Allocator>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool> pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__node_assign_unique(const __container_value_type& __v, __node_pointer __nd) __tree<_Tp, _Compare, _Allocator>::__node_assign_unique(const __container_value_type& __v, __node_pointer __nd)

View File

@ -459,8 +459,6 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT
return __a.__elems_[_Ip]; return __a.__elems_[_Ip];
} }
#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class _Tp, size_t _Size> template <size_t _Ip, class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
_Tp&& _Tp&&
@ -479,8 +477,6 @@ get(const array<_Tp, _Size>&& __a) _NOEXCEPT
return _VSTD::move(__a.__elems_[_Ip]); return _VSTD::move(__a.__elems_[_Ip]);
} }
#endif // !_LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 17 #if _LIBCPP_STD_VER > 17
template <typename _Tp, size_t _Size, size_t... _Index> template <typename _Tp, size_t _Size, size_t... _Index>

View File

@ -213,12 +213,10 @@ public:
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
explicit basic_stringbuf(const string_type& __s, explicit basic_stringbuf(const string_type& __s,
ios_base::openmode __wch = ios_base::in | ios_base::out); ios_base::openmode __wch = ios_base::in | ios_base::out);
#ifndef _LIBCPP_CXX03_LANG
basic_stringbuf(basic_stringbuf&& __rhs); basic_stringbuf(basic_stringbuf&& __rhs);
// 27.8.1.2 Assign and swap: // 27.8.1.2 Assign and swap:
basic_stringbuf& operator=(basic_stringbuf&& __rhs); basic_stringbuf& operator=(basic_stringbuf&& __rhs);
#endif
void swap(basic_stringbuf& __rhs); void swap(basic_stringbuf& __rhs);
// 27.8.1.3 Get and set: // 27.8.1.3 Get and set:
@ -254,8 +252,6 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type&
str(__s); str(__s);
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&& __rhs) basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&& __rhs)
: __mode_(__rhs.__mode_) : __mode_(__rhs.__mode_)
@ -345,8 +341,6 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs)
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
void void
basic_stringbuf<_CharT, _Traits, _Allocator>::swap(basic_stringbuf& __rhs) basic_stringbuf<_CharT, _Traits, _Allocator>::swap(basic_stringbuf& __rhs)
@ -649,13 +643,11 @@ public:
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
explicit basic_istringstream(const string_type& __s, explicit basic_istringstream(const string_type& __s,
ios_base::openmode __wch = ios_base::in); ios_base::openmode __wch = ios_base::in);
#ifndef _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
basic_istringstream(basic_istringstream&& __rhs); basic_istringstream(basic_istringstream&& __rhs);
// 27.8.2.2 Assign and swap: // 27.8.2.2 Assign and swap:
basic_istringstream& operator=(basic_istringstream&& __rhs); basic_istringstream& operator=(basic_istringstream&& __rhs);
#endif // _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
void swap(basic_istringstream& __rhs); void swap(basic_istringstream& __rhs);
@ -683,8 +675,6 @@ basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const stri
{ {
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(basic_istringstream&& __rhs) basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(basic_istringstream&& __rhs)
: basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)), : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)),
@ -702,8 +692,6 @@ basic_istringstream<_CharT, _Traits, _Allocator>::operator=(basic_istringstream&
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
void basic_istringstream<_CharT, _Traits, _Allocator>::swap(basic_istringstream& __rhs) void basic_istringstream<_CharT, _Traits, _Allocator>::swap(basic_istringstream& __rhs)
{ {
@ -766,13 +754,11 @@ public:
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
explicit basic_ostringstream(const string_type& __s, explicit basic_ostringstream(const string_type& __s,
ios_base::openmode __wch = ios_base::out); ios_base::openmode __wch = ios_base::out);
#ifndef _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
basic_ostringstream(basic_ostringstream&& __rhs); basic_ostringstream(basic_ostringstream&& __rhs);
// 27.8.2.2 Assign and swap: // 27.8.2.2 Assign and swap:
basic_ostringstream& operator=(basic_ostringstream&& __rhs); basic_ostringstream& operator=(basic_ostringstream&& __rhs);
#endif // _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
void swap(basic_ostringstream& __rhs); void swap(basic_ostringstream& __rhs);
@ -800,8 +786,6 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const stri
{ {
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(basic_ostringstream&& __rhs) basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(basic_ostringstream&& __rhs)
: basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs)), : basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs)),
@ -819,8 +803,6 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::operator=(basic_ostringstream&
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
void void
basic_ostringstream<_CharT, _Traits, _Allocator>::swap(basic_ostringstream& __rhs) basic_ostringstream<_CharT, _Traits, _Allocator>::swap(basic_ostringstream& __rhs)
@ -885,13 +867,11 @@ public:
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
explicit basic_stringstream(const string_type& __s, explicit basic_stringstream(const string_type& __s,
ios_base::openmode __wch = ios_base::in | ios_base::out); ios_base::openmode __wch = ios_base::in | ios_base::out);
#ifndef _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
basic_stringstream(basic_stringstream&& __rhs); basic_stringstream(basic_stringstream&& __rhs);
// 27.8.2.2 Assign and swap: // 27.8.2.2 Assign and swap:
basic_stringstream& operator=(basic_stringstream&& __rhs); basic_stringstream& operator=(basic_stringstream&& __rhs);
#endif // _LIBCPP_CXX03_LANG
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
void swap(basic_stringstream& __rhs); void swap(basic_stringstream& __rhs);
@ -919,8 +899,6 @@ basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string
{ {
} }
#ifndef _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(basic_stringstream&& __rhs) basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(basic_stringstream&& __rhs)
: basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs)), : basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs)),
@ -938,8 +916,6 @@ basic_stringstream<_CharT, _Traits, _Allocator>::operator=(basic_stringstream&&
return *this; return *this;
} }
#endif // _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator> template <class _CharT, class _Traits, class _Allocator>
void void
basic_stringstream<_CharT, _Traits, _Allocator>::swap(basic_stringstream& __rhs) basic_stringstream<_CharT, _Traits, _Allocator>::swap(basic_stringstream& __rhs)

View File

@ -4273,7 +4273,6 @@ _LIBCPP_INLINE_VAR constexpr bool negation_v
#endif // _LIBCPP_STD_VER > 14 #endif // _LIBCPP_STD_VER > 14
// These traits are used in __tree and __hash_table // These traits are used in __tree and __hash_table
#ifndef _LIBCPP_CXX03_LANG
struct __extract_key_fail_tag {}; struct __extract_key_fail_tag {};
struct __extract_key_self_tag {}; struct __extract_key_self_tag {};
struct __extract_key_first_tag {}; struct __extract_key_first_tag {};
@ -4285,7 +4284,7 @@ struct __can_extract_key
__extract_key_fail_tag>::type {}; __extract_key_fail_tag>::type {};
template <class _Pair, class _Key, class _First, class _Second> template <class _Pair, class _Key, class _First, class _Second>
struct __can_extract_key<_Pair, _Key, pair<_First, _Second>> struct __can_extract_key<_Pair, _Key, pair<_First, _Second> >
: conditional<_IsSame<typename remove_const<_First>::type, _Key>::value, : conditional<_IsSame<typename remove_const<_First>::type, _Key>::value,
__extract_key_first_tag, __extract_key_fail_tag>::type {}; __extract_key_first_tag, __extract_key_fail_tag>::type {};
@ -4303,8 +4302,6 @@ template <class _ValTy, class _Key, class _RawValTy>
struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy> struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy>
: false_type {}; : false_type {};
#endif
#ifndef _LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED #ifndef _LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED
#if _LIBCPP_STD_VER > 17 #if _LIBCPP_STD_VER > 17
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY