diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -354,18 +354,18 @@ typedef typename __alloc_traits::const_pointer const_pointer; typedef __wrap_iter iterator; typedef __wrap_iter const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; static_assert((is_same::value), "Allocator::value_type must be same type as value_type"); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector() _NOEXCEPT_(is_nothrow_default_constructible::value) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a) + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI explicit vector(const allocator_type& __a) #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value) #else @@ -373,7 +373,7 @@ #endif : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n); #if _LIBCPP_STD_VER > 11 @@ -386,7 +386,7 @@ vector(size_type __n, const value_type& __x, const allocator_type& __a) : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -425,7 +425,7 @@ value_type, typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI ~vector() { __annotate_delete(); @@ -440,22 +440,22 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __x); _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __x, const __type_identity_t& __a); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector& operator=(const vector& __x); #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector(initializer_list __il); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector(initializer_list __il, const allocator_type& __a); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} #endif // !_LIBCPP_CXX03_LANG - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector(vector&& __x) #if _LIBCPP_STD_VER > 14 noexcept; @@ -463,9 +463,9 @@ _NOEXCEPT_(is_nothrow_move_constructible::value); #endif - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector(vector&& __x, const __type_identity_t& __a); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI vector& operator=(vector&& __x) _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)); @@ -492,106 +492,106 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const_reference __u); #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void assign(initializer_list __il) {assign(__il.begin(), __il.end());} #endif - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const _NOEXCEPT {return this->__alloc();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator end() _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT; + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT; + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT; + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT; + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const _NOEXCEPT {return begin();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_iterator cend() const _NOEXCEPT {return end();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const _NOEXCEPT {return rend();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI size_type size() const _NOEXCEPT {return static_cast(this->__end_ - this->__begin_);} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI size_type capacity() const _NOEXCEPT {return static_cast(__end_cap() - this->__begin_);} - _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool empty() const _NOEXCEPT {return this->__begin_ == this->__end_;} _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT; _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n); _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const _NOEXCEPT; + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI reference operator[](size_type __n) _NOEXCEPT; + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __n) const _NOEXCEPT; _LIBCPP_CONSTEXPR_AFTER_CXX17 reference at(size_type __n); _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference at(size_type __n) const; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference front() _NOEXCEPT + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI reference front() _NOEXCEPT { _LIBCPP_ASSERT(!empty(), "front() called on an empty vector"); return *this->__begin_; } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference front() const _NOEXCEPT + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT { _LIBCPP_ASSERT(!empty(), "front() called on an empty vector"); return *this->__begin_; } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference back() _NOEXCEPT + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI reference back() _NOEXCEPT { _LIBCPP_ASSERT(!empty(), "back() called on an empty vector"); return *(this->__end_ - 1); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference back() const _NOEXCEPT + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT { _LIBCPP_ASSERT(!empty(), "back() called on an empty vector"); return *(this->__end_ - 1); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI value_type* data() _NOEXCEPT - {return _VSTD::__to_address(this->__begin_);} + {return std::__to_address(this->__begin_);} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const value_type* data() const _NOEXCEPT - {return _VSTD::__to_address(this->__begin_);} + {return std::__to_address(this->__begin_);} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x); + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x); + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x); template - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI #if _LIBCPP_STD_VER > 14 reference emplace_back(_Args&&... __args); #else void emplace_back(_Args&&... __args); #endif - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void pop_back(); _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const_reference __x); @@ -622,15 +622,15 @@ insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last); #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, initializer_list __il) {return insert(__position, __il.begin(), __il.end());} #endif - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position); + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __position); _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { size_type __old_size = size(); @@ -667,7 +667,7 @@ __compressed_pair __end_cap_ = __compressed_pair(nullptr, __default_init_tag()); - _LIBCPP_INLINE_VISIBILITY void __invalidate_iterators_past(pointer __new_last); + _LIBCPP_HIDE_FROM_ABI void __invalidate_iterators_past(pointer __new_last); // Allocate space for __n objects // throws length_error if __n > max_size() @@ -687,9 +687,9 @@ } _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __new_size) const; + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI size_type __recommend(size_type __new_size) const; _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x); template _LIBCPP_CONSTEXPR_AFTER_CXX17 @@ -701,9 +701,9 @@ __construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n); _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n); _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI iterator __make_iter(pointer __p) _NOEXCEPT; - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_iterator __make_iter(const_pointer __p) const _NOEXCEPT; _LIBCPP_CONSTEXPR_AFTER_CXX17 void __swap_out_circular_buffer(__split_buffer& __v); _LIBCPP_CONSTEXPR_AFTER_CXX17 pointer __swap_out_circular_buffer(__split_buffer& __v, pointer __p); @@ -712,7 +712,7 @@ _NOEXCEPT_(is_nothrow_move_assignable::value); _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type) _NOEXCEPT_(__alloc_traits::is_always_equal::value); - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last) _NOEXCEPT { if (!__libcpp_is_constant_evaluated()) @@ -723,11 +723,11 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI inline void __push_back_slow_path(_Up&& __x); template - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI inline void __emplace_back_slow_path(_Args&&... __args); // The following functions are no-ops outside of AddressSanitizer mode. @@ -745,30 +745,30 @@ __sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid); } #else - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __annotate_contiguous_container(const void*, const void*, const void*, const void*) const _NOEXCEPT {} #endif - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __annotate_new(size_type __current_size) const _NOEXCEPT { __annotate_contiguous_container(data(), data() + capacity(), data() + capacity(), data() + __current_size); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __annotate_delete() const _NOEXCEPT { __annotate_contiguous_container(data(), data() + capacity(), data() + size(), data() + capacity()); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __annotate_increase(size_type __n) const _NOEXCEPT { __annotate_contiguous_container(data(), data() + capacity(), data() + size(), data() + size() + __n); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __annotate_shrink(size_type __old_size) const _NOEXCEPT { __annotate_contiguous_container(data(), data() + capacity(), @@ -802,44 +802,44 @@ }; template - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __construct_one_at_end(_Args&& ...__args) { _ConstructTransaction __tx(*this, 1); - __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_), - _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_), + std::forward<_Args>(__args)...); ++__tx.__pos_; } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI allocator_type& __alloc() _NOEXCEPT {return this->__end_cap_.second();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const allocator_type& __alloc() const _NOEXCEPT {return this->__end_cap_.second();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT {return this->__end_cap_.first();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT {return this->__end_cap_.first();} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __clear() _NOEXCEPT {__base_destruct_at_end(this->__begin_);} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __base_destruct_at_end(pointer __new_last) _NOEXCEPT { pointer __soon_to_be_end = this->__end_; while (__new_last != __soon_to_be_end) - __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__soon_to_be_end)); + __alloc_traits::destroy(__alloc(), std::__to_address(--__soon_to_be_end)); this->__end_ = __new_last; } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c) {__copy_assign_alloc(__c, integral_constant());} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c) _NOEXCEPT_( !__alloc_traits::propagate_on_container_move_assignment::value || @@ -849,15 +849,15 @@ _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_length_error() const { - _VSTD::__throw_length_error("vector"); + std::__throw_length_error("vector"); } _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { - _VSTD::__throw_out_of_range("vector"); + std::__throw_out_of_range("vector"); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c, true_type) { if (__alloc() != __c.__alloc()) @@ -869,18 +869,18 @@ __alloc() = __c.__alloc(); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector&, false_type) {} - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { - __alloc() = _VSTD::move(__c.__alloc()); + __alloc() = std::move(__c.__alloc()); } - _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(vector&, false_type) _NOEXCEPT {} @@ -914,9 +914,9 @@ __v.__begin_ = std::__uninitialized_allocator_move_if_noexcept( __alloc(), _RevIter(__end_), _RevIter(__begin_), _RevIter(__v.__begin_)) .base(); - _VSTD::swap(this->__begin_, __v.__begin_); - _VSTD::swap(this->__end_, __v.__end_); - _VSTD::swap(this->__end_cap(), __v.__end_cap()); + std::swap(this->__begin_, __v.__begin_); + std::swap(this->__end_, __v.__end_); + std::swap(this->__end_cap(), __v.__end_cap()); __v.__first_ = __v.__begin_; __annotate_new(size()); std::__debug_db_invalidate_all(this); @@ -934,9 +934,9 @@ __alloc(), _RevIter(__p), _RevIter(__begin_), _RevIter(__v.__begin_)) .base(); __v.__end_ = std::__uninitialized_allocator_move_if_noexcept(__alloc(), __p, __end_, __v.__end_); - _VSTD::swap(this->__begin_, __v.__begin_); - _VSTD::swap(this->__end_, __v.__end_); - _VSTD::swap(this->__end_cap(), __v.__end_cap()); + std::swap(this->__begin_, __v.__begin_); + std::swap(this->__end_, __v.__end_); + std::swap(this->__end_cap(), __v.__end_cap()); __v.__first_ = __v.__begin_; __annotate_new(size()); std::__debug_db_invalidate_all(this); @@ -961,14 +961,14 @@ typename vector<_Tp, _Allocator>::size_type vector<_Tp, _Allocator>::max_size() const _NOEXCEPT { - return _VSTD::min(__alloc_traits::max_size(this->__alloc()), + return std::min(__alloc_traits::max_size(this->__alloc()), numeric_limits::max()); } // Precondition: __new_size > capacity() template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type vector<_Tp, _Allocator>::__recommend(size_type __new_size) const { @@ -978,7 +978,7 @@ const size_type __cap = capacity(); if (__cap >= __ms / 2) return __ms; - return _VSTD::max(2 * __cap, __new_size); + return std::max(2 * __cap, __new_size); } // Default constructs __n objects starting at __end_ @@ -994,7 +994,7 @@ _ConstructTransaction __tx(*this, __n); const_pointer __new_end = __tx.__new_end_; for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) { - __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos)); + __alloc_traits::construct(this->__alloc(), std::__to_address(__pos)); } } @@ -1013,7 +1013,7 @@ _ConstructTransaction __tx(*this, __n); const_pointer __new_end = __tx.__new_end_; for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) { - __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos), __x); + __alloc_traits::construct(this->__alloc(), std::__to_address(__pos), __x); } } @@ -1075,7 +1075,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 vector<_Tp, _Allocator>::vector(size_type __n) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -1089,7 +1089,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a) : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -1102,7 +1102,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -1120,7 +1120,7 @@ typename iterator_traits<_InputIterator>::reference>::value, _InputIterator>::type __last) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __first != __last; ++__first) emplace_back(*__first); } @@ -1135,7 +1135,7 @@ typename iterator_traits<_InputIterator>::reference>::value>::type*) : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __first != __last; ++__first) emplace_back(*__first); } @@ -1150,8 +1150,8 @@ typename iterator_traits<_ForwardIterator>::reference>::value, _ForwardIterator>::type __last) { - _VSTD::__debug_db_insert_c(this); - size_type __n = static_cast(_VSTD::distance(__first, __last)); + std::__debug_db_insert_c(this); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -1169,8 +1169,8 @@ typename iterator_traits<_ForwardIterator>::reference>::value>::type*) : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); - size_type __n = static_cast(_VSTD::distance(__first, __last)); + std::__debug_db_insert_c(this); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -1183,7 +1183,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x) : __end_cap_(nullptr, __alloc_traits::select_on_container_copy_construction(__x.__alloc())) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); size_type __n = __x.size(); if (__n > 0) { @@ -1197,7 +1197,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const __type_identity_t& __a) : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); size_type __n = __x.size(); if (__n > 0) { @@ -1208,16 +1208,16 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>::vector(vector&& __x) #if _LIBCPP_STD_VER > 14 noexcept #else _NOEXCEPT_(is_nothrow_move_constructible::value) #endif - : __end_cap_(nullptr, _VSTD::move(__x.__alloc())) + : __end_cap_(nullptr, std::move(__x.__alloc())) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); std::__debug_db_swap(this, std::addressof(__x)); this->__begin_ = __x.__begin_; this->__end_ = __x.__end_; @@ -1227,11 +1227,11 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t& __a) : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__a == __x.__alloc()) { this->__begin_ = __x.__begin_; @@ -1251,10 +1251,10 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>::vector(initializer_list __il) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__il.size() > 0) { __vallocate(__il.size()); @@ -1264,11 +1264,11 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>::vector(initializer_list __il, const allocator_type& __a) : __end_cap_(nullptr, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__il.size() > 0) { __vallocate(__il.size()); @@ -1280,7 +1280,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>& vector<_Tp, _Allocator>::operator=(vector&& __x) _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) @@ -1322,11 +1322,11 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI vector<_Tp, _Allocator>& vector<_Tp, _Allocator>::operator=(const vector& __x) { - if (this != _VSTD::addressof(__x)) + if (this != std::addressof(__x)) { __copy_assign_alloc(__x); assign(__x.__begin_, __x.__end_); @@ -1362,7 +1362,7 @@ >::type vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) { - size_type __new_size = static_cast(_VSTD::distance(__first, __last)); + size_type __new_size = static_cast(std::distance(__first, __last)); if (__new_size <= capacity()) { _ForwardIterator __mid = __last; @@ -1371,9 +1371,9 @@ { __growing = true; __mid = __first; - _VSTD::advance(__mid, size()); + std::advance(__mid, size()); } - pointer __m = _VSTD::copy(__first, __mid, this->__begin_); + pointer __m = std::copy(__first, __mid, this->__begin_); if (__growing) __construct_at_end(__mid, __last, __new_size - size()); else @@ -1396,7 +1396,7 @@ if (__n <= capacity()) { size_type __s = size(); - _VSTD::fill_n(this->__begin_, _VSTD::min(__n, __s), __u); + std::fill_n(this->__begin_, std::min(__n, __s), __u); if (__n > __s) __construct_at_end(__n - __s, __u); else @@ -1413,7 +1413,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::begin() _NOEXCEPT { @@ -1422,7 +1422,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_iterator vector<_Tp, _Allocator>::begin() const _NOEXCEPT { @@ -1431,7 +1431,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::end() _NOEXCEPT { @@ -1440,7 +1440,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_iterator vector<_Tp, _Allocator>::end() const _NOEXCEPT { @@ -1449,7 +1449,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::reference vector<_Tp, _Allocator>::operator[](size_type __n) _NOEXCEPT { @@ -1459,7 +1459,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::const_reference vector<_Tp, _Allocator>::operator[](size_type __n) const _NOEXCEPT { @@ -1533,15 +1533,15 @@ { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), size(), __a); - // __v.push_back(_VSTD::forward<_Up>(__x)); - __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Up>(__x)); + // __v.push_back(std::forward<_Up>(__x)); + __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Up>(__x)); __v.__end_++; __swap_out_circular_buffer(__v); } template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI void vector<_Tp, _Allocator>::push_back(const_reference __x) { @@ -1555,16 +1555,16 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI void vector<_Tp, _Allocator>::push_back(value_type&& __x) { if (this->__end_ < this->__end_cap()) { - __construct_one_at_end(_VSTD::move(__x)); + __construct_one_at_end(std::move(__x)); } else - __push_back_slow_path(_VSTD::move(__x)); + __push_back_slow_path(std::move(__x)); } template @@ -1575,8 +1575,8 @@ { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), size(), __a); -// __v.emplace_back(_VSTD::forward<_Args>(__args)...); - __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Args>(__args)...); +// __v.emplace_back(std::forward<_Args>(__args)...); + __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Args>(__args)...); __v.__end_++; __swap_out_circular_buffer(__v); } @@ -1594,10 +1594,10 @@ { if (this->__end_ < this->__end_cap()) { - __construct_one_at_end(_VSTD::forward<_Args>(__args)...); + __construct_one_at_end(std::forward<_Args>(__args)...); } else - __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...); + __emplace_back_slow_path(std::forward<_Args>(__args)...); #if _LIBCPP_STD_VER > 14 return this->back(); #endif @@ -1615,17 +1615,17 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::erase(const_iterator __position) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::erase(iterator) called with an iterator not referring to this vector"); _LIBCPP_ASSERT(__position != end(), "vector::erase(iterator) called with a non-dereferenceable iterator"); difference_type __ps = __position - cbegin(); pointer __p = this->__begin_ + __ps; - this->__destruct_at_end(_VSTD::move(__p + 1, this->__end_, __p)); + this->__destruct_at_end(std::move(__p + 1, this->__end_, __p)); if (!__libcpp_is_constant_evaluated()) this->__invalidate_iterators_past(__p - 1); iterator __r = iterator(this, __p); @@ -1637,15 +1637,15 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__first)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__first)) == this, "vector::erase(iterator, iterator) called with an iterator not referring to this vector"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__last)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__last)) == this, "vector::erase(iterator, iterator) called with an iterator not referring to this vector"); _LIBCPP_ASSERT(__first <= __last, "vector::erase(first, last) called with invalid range"); pointer __p = this->__begin_ + (__first - begin()); if (__first != __last) { - this->__destruct_at_end(_VSTD::move(__p + (__last - __first), this->__end_, __p)); + this->__destruct_at_end(std::move(__p + (__last - __first), this->__end_, __p)); if (!__libcpp_is_constant_evaluated()) this->__invalidate_iterators_past(__p - 1); } @@ -1666,11 +1666,11 @@ for (pointer __pos = __tx.__pos_; __i < __from_e; ++__i, (void) ++__pos, __tx.__pos_ = __pos) { __alloc_traits::construct(this->__alloc(), - _VSTD::__to_address(__pos), - _VSTD::move(*__i)); + std::__to_address(__pos), + std::move(*__i)); } } - _VSTD::move_backward(__from_s, __from_s + __n, __old_last); + std::move_backward(__from_s, __from_s + __n, __old_last); } template @@ -1678,7 +1678,7 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); // We can't compare unrelated pointers inside constant expressions @@ -1712,26 +1712,26 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); if (this->__end_ < this->__end_cap()) { if (__p == this->__end_) { - __construct_one_at_end(_VSTD::move(__x)); + __construct_one_at_end(std::move(__x)); } else { __move_range(__p, this->__end_, __p + 1); - *__p = _VSTD::move(__x); + *__p = std::move(__x); } } else { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), __p - this->__begin_, __a); - __v.push_back(_VSTD::move(__x)); + __v.push_back(std::move(__x)); __p = __swap_out_circular_buffer(__v, __p); } return iterator(this, __p); @@ -1743,27 +1743,27 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::emplace(iterator, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); if (this->__end_ < this->__end_cap()) { if (__p == this->__end_) { - __construct_one_at_end(_VSTD::forward<_Args>(__args)...); + __construct_one_at_end(std::forward<_Args>(__args)...); } else { - __temp_value __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...); + __temp_value __tmp(this->__alloc(), std::forward<_Args>(__args)...); __move_range(__p, this->__end_, __p + 1); - *__p = _VSTD::move(__tmp.get()); + *__p = std::move(__tmp.get()); } } else { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), __p - this->__begin_, __a); - __v.emplace_back(_VSTD::forward<_Args>(__args)...); + __v.emplace_back(std::forward<_Args>(__args)...); __p = __swap_out_circular_buffer(__v, __p); } return iterator(this, __p); @@ -1774,7 +1774,7 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, n, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); if (__n > 0) @@ -1796,7 +1796,7 @@ const_pointer __xr = pointer_traits::pointer_to(__x); if (__p <= __xr && __xr < this->__end_) __xr += __old_n; - _VSTD::fill_n(__p, __n, *__xr); + std::fill_n(__p, __n, *__xr); } } else @@ -1820,7 +1820,7 @@ >::type vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, range) called with an iterator not referring to this vector"); difference_type __off = __position - begin(); pointer __p = this->__begin_ + __off; @@ -1852,9 +1852,9 @@ } #endif // _LIBCPP_NO_EXCEPTIONS } - __p = _VSTD::rotate(__p, __old_last, this->__end_); - insert(iterator(this, __p), _VSTD::make_move_iterator(__v.begin()), - _VSTD::make_move_iterator(__v.end())); + __p = std::rotate(__p, __old_last, this->__end_); + insert(iterator(this, __p), std::make_move_iterator(__v.begin()), + std::make_move_iterator(__v.end())); return begin() + __off; } @@ -1871,10 +1871,10 @@ >::type vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, range) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); - difference_type __n = _VSTD::distance(__first, __last); + difference_type __n = std::distance(__first, __last); if (__n > 0) { if (__n <= this->__end_cap() - this->__end_) @@ -1887,14 +1887,14 @@ { __m = __first; difference_type __diff = this->__end_ - __p; - _VSTD::advance(__m, __diff); + std::advance(__m, __diff); __construct_at_end(__m, __last, __n - __diff); __n = __dx; } if (__n > 0) { __move_range(__p, __old_last, __p + __old_n); - _VSTD::copy(__first, __m, __p); + std::copy(__first, __m, __p); } } else @@ -1947,10 +1947,10 @@ this->__alloc() == __x.__alloc(), "vector::swap: Either propagate_on_container_swap must be true" " or the allocators must compare equal"); - _VSTD::swap(this->__begin_, __x.__begin_); - _VSTD::swap(this->__end_, __x.__end_); - _VSTD::swap(this->__end_cap(), __x.__end_cap()); - _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(), + std::swap(this->__begin_, __x.__begin_); + std::swap(this->__end_, __x.__end_); + std::swap(this->__end_cap(), __x.__end_cap()); + std::__swap_allocator(this->__alloc(), __x.__alloc(), integral_constant()); std::__debug_db_swap(this, std::addressof(__x)); } @@ -2012,7 +2012,7 @@ #endif // _LIBCPP_ENABLE_DEBUG_MODE template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI void vector<_Tp, _Allocator>::__invalidate_iterators_past(pointer __new_last) { #ifdef _LIBCPP_ENABLE_DEBUG_MODE @@ -2023,7 +2023,7 @@ if (__i->base() > __new_last) { (*__p)->__c_ = nullptr; if (--__c->end_ != __p) - _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); } } __get_db()->unlock(); @@ -2059,8 +2059,8 @@ typedef __bit_iterator const_pointer; typedef pointer iterator; typedef const_pointer const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; private: typedef typename __rebind_alloc_helper<__alloc_traits, __storage_type>::type __storage_allocator; @@ -2079,33 +2079,33 @@ typedef __bit_const_reference const_reference; #endif private: - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type& __cap() _NOEXCEPT {return __cap_alloc_.first();} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const size_type& __cap() const _NOEXCEPT {return __cap_alloc_.first();} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __storage_allocator& __alloc() _NOEXCEPT {return __cap_alloc_.second();} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const __storage_allocator& __alloc() const _NOEXCEPT {return __cap_alloc_.second();} static const unsigned __bits_per_word = static_cast(sizeof(__storage_type) * CHAR_BIT); - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 static size_type __internal_cap_to_external(size_type __n) _NOEXCEPT {return __n * __bits_per_word;} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 static size_type __external_cap_to_internal(size_type __n) _NOEXCEPT {return (__n - 1) / __bits_per_word + 1;} public: - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector() _NOEXCEPT_(is_nothrow_default_constructible::value); - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(const allocator_type& __a) + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(const allocator_type& __a) #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value); #else @@ -2139,13 +2139,13 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(initializer_list __il); _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(initializer_list __il, const allocator_type& __a); - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} #endif // !_LIBCPP_CXX03_LANG - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(vector&& __v) #if _LIBCPP_STD_VER > 14 noexcept; @@ -2153,7 +2153,7 @@ _NOEXCEPT_(is_nothrow_move_constructible::value); #endif _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(vector&& __v, const __type_identity_t& __a); - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector& operator=(vector&& __v) _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)); @@ -2173,98 +2173,98 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const value_type& __x); #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void assign(initializer_list __il) {assign(__il.begin(), __il.end());} #endif - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 allocator_type get_allocator() const _NOEXCEPT + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 allocator_type get_allocator() const _NOEXCEPT {return allocator_type(this->__alloc());} _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type capacity() const _NOEXCEPT {return __internal_cap_to_external(__cap());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type size() const _NOEXCEPT {return __size_;} - _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool empty() const _NOEXCEPT {return __size_ == 0;} _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n); _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator begin() _NOEXCEPT {return __make_iter(0);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_iterator begin() const _NOEXCEPT {return __make_iter(0);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator end() _NOEXCEPT {return __make_iter(__size_);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_iterator end() const _NOEXCEPT {return __make_iter(__size_);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_iterator cbegin() const _NOEXCEPT {return __make_iter(0);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_iterator cend() const _NOEXCEPT {return __make_iter(__size_);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reverse_iterator crend() const _NOEXCEPT {return rend();} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](size_type __n) {return __make_ref(__n);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference operator[](size_type __n) const {return __make_ref(__n);} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](size_type __n) {return __make_ref(__n);} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference operator[](size_type __n) const {return __make_ref(__n);} reference at(size_type __n); const_reference at(size_type __n) const; - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference front() {return __make_ref(0);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference front() const {return __make_ref(0);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference back() {return __make_ref(__size_ - 1);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference back() const {return __make_ref(__size_ - 1);} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference front() {return __make_ref(0);} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference front() const {return __make_ref(0);} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference back() {return __make_ref(__size_ - 1);} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference back() const {return __make_ref(__size_ - 1);} _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(const value_type& __x); #if _LIBCPP_STD_VER > 11 template #if _LIBCPP_STD_VER > 14 - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference emplace_back(_Args&&... __args) + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference emplace_back(_Args&&... __args) #else - _LIBCPP_INLINE_VISIBILITY void emplace_back(_Args&&... __args) + _LIBCPP_HIDE_FROM_ABI void emplace_back(_Args&&... __args) #endif { - push_back ( value_type ( _VSTD::forward<_Args>(__args)... )); + push_back ( value_type ( std::forward<_Args>(__args)... )); #if _LIBCPP_STD_VER > 14 return this->back(); #endif } #endif - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void pop_back() {--__size_;} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void pop_back() {--__size_;} #if _LIBCPP_STD_VER > 11 template - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args) - { return insert ( __position, value_type ( _VSTD::forward<_Args>(__args)... )); } + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args) + { return insert ( __position, value_type ( std::forward<_Args>(__args)... )); } #endif _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const value_type& __x); @@ -2283,15 +2283,15 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last); #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, initializer_list __il) {return insert(__position, __il.begin(), __il.end());} #endif - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __position); + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __position); _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last); - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void clear() _NOEXCEPT {__size_ = 0;} _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(vector&) @@ -2301,7 +2301,7 @@ _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); #endif - _LIBCPP_CONSTEXPR_AFTER_CXX17 static void swap(reference __x, reference __y) _NOEXCEPT { _VSTD::swap(__x, __y); } + _LIBCPP_CONSTEXPR_AFTER_CXX17 static void swap(reference __x, reference __y) _NOEXCEPT { std::swap(__x, __y); } _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz, value_type __x = false); _LIBCPP_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT; @@ -2311,12 +2311,12 @@ private: _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_length_error() const { - _VSTD::__throw_length_error("vector"); + std::__throw_length_error("vector"); } _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { - _VSTD::__throw_out_of_range("vector"); + std::__throw_out_of_range("vector"); } // Allocate space for __n objects @@ -2340,11 +2340,11 @@ } _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 static size_type __align_it(size_type __new_size) _NOEXCEPT {return (__new_size + (__bits_per_word-1)) & ~((size_type)__bits_per_word-1);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type __recommend(size_type __new_size) const; - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, bool __x); + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type __recommend(size_type __new_size) const; + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, bool __x); template typename enable_if < @@ -2353,29 +2353,29 @@ >::type _LIBCPP_CONSTEXPR_AFTER_CXX17 __construct_at_end(_ForwardIterator __first, _ForwardIterator __last); _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x); - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference __make_ref(size_type __pos) _NOEXCEPT {return reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference __make_ref(size_type __pos) const _NOEXCEPT { return __bit_const_reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word); } - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator __make_iter(size_type __pos) _NOEXCEPT {return iterator(__begin_ + __pos / __bits_per_word, static_cast(__pos % __bits_per_word));} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_iterator __make_iter(size_type __pos) const _NOEXCEPT {return const_iterator(__begin_ + __pos / __bits_per_word, static_cast(__pos % __bits_per_word));} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator __const_iterator_cast(const_iterator __p) _NOEXCEPT {return begin() + (__p - cbegin());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __copy_assign_alloc(const vector& __v) {__copy_assign_alloc(__v, integral_constant());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __copy_assign_alloc(const vector& __c, true_type) { if (__alloc() != __c.__alloc()) @@ -2383,28 +2383,28 @@ __alloc() = __c.__alloc(); } - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __copy_assign_alloc(const vector&, false_type) {} _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type); _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value); - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign_alloc(vector& __c) _NOEXCEPT_( !__storage_traits::propagate_on_container_move_assignment::value || is_nothrow_move_assignable::value) {__move_assign_alloc(__c, integral_constant());} - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign_alloc(vector& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { - __alloc() = _VSTD::move(__c.__alloc()); + __alloc() = std::move(__c.__alloc()); } - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign_alloc(vector&, false_type) _NOEXCEPT {} @@ -2446,7 +2446,7 @@ // Precondition: __new_size > capacity() template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 typename vector::size_type vector::__recommend(size_type __new_size) const { @@ -2456,7 +2456,7 @@ const size_type __cap = capacity(); if (__cap >= __ms / 2) return __ms; - return _VSTD::max(2 * __cap, __align_it(__new_size)); + return std::max(2 * __cap, __align_it(__new_size)); } // Default constructs __n objects starting at __end_ @@ -2464,7 +2464,7 @@ // Precondition: size() + __n <= capacity() // Postcondition: size() == size() + __n template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void vector::__construct_at_end(size_type __n, bool __x) { @@ -2477,7 +2477,7 @@ else this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0); } - _VSTD::fill_n(__make_iter(__old_size), __n, __x); + std::fill_n(__make_iter(__old_size), __n, __x); } template @@ -2491,7 +2491,7 @@ vector::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) { size_type __old_size = this->__size_; - this->__size_ += _VSTD::distance(__first, __last); + this->__size_ += std::distance(__first, __last); if (__old_size == 0 || ((__old_size - 1) / __bits_per_word) != ((this->__size_ - 1) / __bits_per_word)) { if (this->__size_ <= __bits_per_word) @@ -2499,11 +2499,11 @@ else this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0); } - _VSTD::copy(__first, __last, __make_iter(__old_size)); + std::copy(__first, __last, __make_iter(__old_size)); } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector::vector() _NOEXCEPT_(is_nothrow_default_constructible::value) : __begin_(nullptr), @@ -2513,7 +2513,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector::vector(const allocator_type& __a) #if _LIBCPP_STD_VER <= 14 _NOEXCEPT_(is_nothrow_copy_constructible::value) @@ -2647,7 +2647,7 @@ __size_(0), __cap_alloc_(0, __default_init_tag()) { - size_type __n = static_cast(_VSTD::distance(__first, __last)); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -2664,7 +2664,7 @@ __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) { - size_type __n = static_cast(_VSTD::distance(__first, __last)); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -2748,7 +2748,7 @@ vector& vector::operator=(const vector& __v) { - if (this != _VSTD::addressof(__v)) + if (this != std::addressof(__v)) { __copy_assign_alloc(__v); if (__v.__size_) @@ -2758,7 +2758,7 @@ __vdeallocate(); __vallocate(__v.__size_); } - _VSTD::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_); + std::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_); } __size_ = __v.__size_; } @@ -2766,7 +2766,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 vector::vector(vector&& __v) +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector::vector(vector&& __v) #if _LIBCPP_STD_VER > 14 _NOEXCEPT #else @@ -2774,7 +2774,7 @@ #endif : __begin_(__v.__begin_), __size_(__v.__size_), - __cap_alloc_(_VSTD::move(__v.__cap_alloc_)) { + __cap_alloc_(std::move(__v.__cap_alloc_)) { __v.__begin_ = nullptr; __v.__size_ = 0; __v.__cap() = 0; @@ -2803,7 +2803,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 vector& vector::operator=(vector&& __v) _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) @@ -2854,7 +2854,7 @@ __v.__size_ = __n; swap(__v); } - _VSTD::fill_n(begin(), __n, __x); + std::fill_n(begin(), __n, __x); } std::__debug_db_invalidate_all(this); } @@ -2882,7 +2882,7 @@ vector::assign(_ForwardIterator __first, _ForwardIterator __last) { clear(); - difference_type __ns = _VSTD::distance(__first, __last); + difference_type __ns = std::distance(__first, __last); _LIBCPP_ASSERT(__ns >= 0, "invalid range specified"); const size_t __n = static_cast(__ns); if (__n) @@ -2969,7 +2969,7 @@ { const_iterator __old_end = end(); ++__size_; - _VSTD::copy_backward(__position, __old_end, end()); + std::copy_backward(__position, __old_end, end()); __r = __const_iterator_cast(__position); } else @@ -2977,8 +2977,8 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + 1)); __v.__size_ = __size_ + 1; - __r = _VSTD::copy(cbegin(), __position, __v.begin()); - _VSTD::copy_backward(__position, cend(), __v.end()); + __r = std::copy(cbegin(), __position, __v.begin()); + std::copy_backward(__position, cend(), __v.end()); swap(__v); } *__r = __x; @@ -2995,7 +2995,7 @@ { const_iterator __old_end = end(); __size_ += __n; - _VSTD::copy_backward(__position, __old_end, end()); + std::copy_backward(__position, __old_end, end()); __r = __const_iterator_cast(__position); } else @@ -3003,11 +3003,11 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + __n)); __v.__size_ = __size_ + __n; - __r = _VSTD::copy(cbegin(), __position, __v.begin()); - _VSTD::copy_backward(__position, cend(), __v.end()); + __r = std::copy(cbegin(), __position, __v.begin()); + std::copy_backward(__position, cend(), __v.end()); swap(__v); } - _VSTD::fill_n(__r, __n, __x); + std::fill_n(__r, __n, __x); return __r; } @@ -3048,7 +3048,7 @@ } #endif // _LIBCPP_NO_EXCEPTIONS } - __p = _VSTD::rotate(__p, __old_end, end()); + __p = std::rotate(__p, __old_end, end()); insert(__p, __v.begin(), __v.end()); return begin() + __off; } @@ -3063,7 +3063,7 @@ >::type vector::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) { - const difference_type __n_signed = _VSTD::distance(__first, __last); + const difference_type __n_signed = std::distance(__first, __last); _LIBCPP_ASSERT(__n_signed >= 0, "invalid range specified"); const size_type __n = static_cast(__n_signed); iterator __r; @@ -3072,7 +3072,7 @@ { const_iterator __old_end = end(); __size_ += __n; - _VSTD::copy_backward(__position, __old_end, end()); + std::copy_backward(__position, __old_end, end()); __r = __const_iterator_cast(__position); } else @@ -3080,21 +3080,21 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + __n)); __v.__size_ = __size_ + __n; - __r = _VSTD::copy(cbegin(), __position, __v.begin()); - _VSTD::copy_backward(__position, cend(), __v.end()); + __r = std::copy(cbegin(), __position, __v.begin()); + std::copy_backward(__position, cend(), __v.end()); swap(__v); } - _VSTD::copy(__first, __last, __r); + std::copy(__first, __last, __r); return __r; } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 typename vector::iterator vector::erase(const_iterator __position) { iterator __r = __const_iterator_cast(__position); - _VSTD::copy(__position + 1, this->cend(), __r); + std::copy(__position + 1, this->cend(), __r); --__size_; return __r; } @@ -3106,7 +3106,7 @@ { iterator __r = __const_iterator_cast(__first); difference_type __d = __last - __first; - _VSTD::copy(__last, this->cend(), __r); + std::copy(__last, this->cend(), __r); __size_ -= __d; return __r; } @@ -3121,10 +3121,10 @@ __is_nothrow_swappable::value) #endif { - _VSTD::swap(this->__begin_, __x.__begin_); - _VSTD::swap(this->__size_, __x.__size_); - _VSTD::swap(this->__cap(), __x.__cap()); - _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(), + std::swap(this->__begin_, __x.__begin_); + std::swap(this->__size_, __x.__size_); + std::swap(this->__cap(), __x.__cap()); + std::__swap_allocator(this->__alloc(), __x.__alloc(), integral_constant()); } @@ -3148,10 +3148,10 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + __n)); __v.__size_ = __size_ + __n; - __r = _VSTD::copy(cbegin(), cend(), __v.begin()); + __r = std::copy(cbegin(), cend(), __v.begin()); swap(__v); } - _VSTD::fill_n(__r, __n, __x); + std::fill_n(__r, __n, __x); } else __size_ = __sz; @@ -3218,24 +3218,24 @@ struct _LIBCPP_TEMPLATE_VIS hash > : public __unary_function, size_t> { - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_t operator()(const vector& __vec) const _NOEXCEPT {return __vec.__hash_code();} }; template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI bool operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { const typename vector<_Tp, _Allocator>::size_type __sz = __x.size(); - return __sz == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __sz == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { @@ -3244,16 +3244,16 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI bool operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI bool operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { @@ -3262,7 +3262,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { @@ -3271,7 +3271,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { @@ -3280,7 +3280,7 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI void swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) @@ -3291,19 +3291,19 @@ #if _LIBCPP_STD_VER > 17 template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type erase(vector<_Tp, _Allocator>& __c, const _Up& __v) { auto __old_size = __c.size(); - __c.erase(_VSTD::remove(__c.begin(), __c.end(), __v), __c.end()); + __c.erase(std::remove(__c.begin(), __c.end(), __v), __c.end()); return __old_size - __c.size(); } template _LIBCPP_CONSTEXPR_AFTER_CXX17 -inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type +inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type erase_if(vector<_Tp, _Allocator>& __c, _Predicate __pred) { auto __old_size = __c.size(); - __c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end()); + __c.erase(std::remove_if(__c.begin(), __c.end(), __pred), __c.end()); return __old_size - __c.size(); }