diff options
Diffstat (limited to 'libcxx/include/string')
-rw-r--r-- | libcxx/include/string | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/libcxx/include/string b/libcxx/include/string index 249af093cc8..5996c32cfc6 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1052,8 +1052,8 @@ public: typedef __wrap_iter<pointer> iterator; typedef __wrap_iter<const_pointer> const_iterator; #endif // defined(_LIBCPP_RAW_ITERATORS) - typedef _STD::reverse_iterator<iterator> reverse_iterator; - typedef _STD::reverse_iterator<const_iterator> const_reverse_iterator; + typedef _VSTD::reverse_iterator<iterator> reverse_iterator; + typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator; private: struct __long @@ -1279,7 +1279,7 @@ public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY basic_string& assign(basic_string&& str) - {*this = _STD::move(str); return *this;} + {*this = _VSTD::move(str); return *this;} #endif basic_string& assign(const basic_string& __str, size_type __pos, size_type __n); basic_string& assign(const_pointer __s, size_type __n); @@ -1588,7 +1588,7 @@ private: static void __swap_alloc(allocator_type& __x, allocator_type& __y, true_type) _NOEXCEPT_(__is_nothrow_swappable<allocator_type>::value) { - using _STD::swap; + using _VSTD::swap; swap(__x, __y); } _LIBCPP_INLINE_VISIBILITY @@ -1790,7 +1790,7 @@ template <class _CharT, class _Traits, class _Allocator> _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str) _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value) - : __r_(_STD::move(__str.__r_)) + : __r_(_VSTD::move(__str.__r_)) { __str.__zero(); #ifdef _LIBCPP_DEBUG @@ -1862,7 +1862,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st size_type __str_sz = __str.size(); if (__pos > __str_sz) this->__throw_out_of_range(); - __init(__str.data() + __pos, _STD::min(__n, __str_sz - __pos)); + __init(__str.data() + __pos, _VSTD::min(__n, __str_sz - __pos)); } template <class _CharT, class _Traits, class _Allocator> @@ -1902,7 +1902,7 @@ typename enable_if >::type basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _ForwardIterator __last) { - size_type __sz = static_cast<size_type>(_STD::distance(__first, __last)); + size_type __sz = static_cast<size_type>(_VSTD::distance(__first, __last)); if (__sz > max_size()) this->__throw_length_error(); pointer __p; @@ -1976,7 +1976,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace this->__throw_length_error(); pointer __old_p = __get_pointer(); size_type __cap = __old_cap < __ms / 2 - __alignment ? - __recommend(_STD::max(__old_cap + __delta_cap, 2 * __old_cap)) : + __recommend(_VSTD::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1; pointer __p = __alloc_traits::allocate(__alloc(), __cap+1); __invalidate_all_iterators(); @@ -2006,7 +2006,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_t this->__throw_length_error(); pointer __old_p = __get_pointer(); size_type __cap = __old_cap < __ms / 2 - __alignment ? - __recommend(_STD::max(__old_cap + __delta_cap, 2 * __old_cap)) : + __recommend(_VSTD::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1; pointer __p = __alloc_traits::allocate(__alloc(), __cap+1); __invalidate_all_iterators(); @@ -2120,7 +2120,7 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, tr { clear(); shrink_to_fit(); - __r_ = _STD::move(__str.__r_); + __r_ = _VSTD::move(__str.__r_); __str.__zero(); } @@ -2162,7 +2162,7 @@ typename enable_if >::type basic_string<_CharT, _Traits, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) { - size_type __n = static_cast<size_type>(_STD::distance(__first, __last)); + size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last)); size_type __cap = capacity(); if (__cap < __n) { @@ -2194,7 +2194,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, siz size_type __sz = __str.size(); if (__pos > __sz) this->__throw_out_of_range(); - return assign(__str.data() + __pos, _STD::min(__n, __sz - __pos)); + return assign(__str.data() + __pos, _VSTD::min(__n, __sz - __pos)); } template <class _CharT, class _Traits, class _Allocator> @@ -2293,7 +2293,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(_ForwardIterator __first, _For { size_type __sz = size(); size_type __cap = capacity(); - size_type __n = static_cast<size_type>(_STD::distance(__first, __last)); + size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last)); if (__n) { if (__cap - __sz < __n) @@ -2322,7 +2322,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, siz size_type __sz = __str.size(); if (__pos > __sz) this->__throw_out_of_range(); - return append(__str.data() + __pos, _STD::min(__n, __sz - __pos)); + return append(__str.data() + __pos, _VSTD::min(__n, __sz - __pos)); } template <class _CharT, class _Traits, class _Allocator> @@ -2417,7 +2417,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIt for (; __first != __last; ++__first) push_back(*__first); pointer __p = __get_pointer(); - _STD::rotate(__p + __ip, __p + __old_sz, __p + size()); + _VSTD::rotate(__p + __ip, __p + __old_sz, __p + size()); return iterator(__p + __ip); } @@ -2433,7 +2433,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _Forward size_type __ip = static_cast<size_type>(__pos - begin()); size_type __sz = size(); size_type __cap = capacity(); - size_type __n = static_cast<size_type>(_STD::distance(__first, __last)); + size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last)); if (__n) { pointer __p; @@ -2474,7 +2474,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_ size_type __str_sz = __str.size(); if (__pos2 > __str_sz) this->__throw_out_of_range(); - return insert(__pos1, __str.data() + __pos2, _STD::min(__n, __str_sz - __pos2)); + return insert(__pos1, __str.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2)); } template <class _CharT, class _Traits, class _Allocator> @@ -2535,7 +2535,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __ size_type __sz = size(); if (__pos > __sz) this->__throw_out_of_range(); - __n1 = _STD::min(__n1, __sz - __pos); + __n1 = _VSTD::min(__n1, __sz - __pos); size_type __cap = capacity(); if (__cap - __sz + __n1 >= __n2) { @@ -2586,7 +2586,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __ size_type __sz = size(); if (__pos > __sz) this->__throw_out_of_range(); - __n1 = _STD::min(__n1, __sz - __pos); + __n1 = _VSTD::min(__n1, __sz - __pos); size_type __cap = capacity(); pointer __p; if (__cap - __sz + __n1 >= __n2) @@ -2656,7 +2656,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type _ size_type __str_sz = __str.size(); if (__pos2 > __str_sz) this->__throw_out_of_range(); - return replace(__pos1, __n1, __str.data() + __pos2, _STD::min(__n2, __str_sz - __pos2)); + return replace(__pos1, __n1, __str.data() + __pos2, _VSTD::min(__n2, __str_sz - __pos2)); } template <class _CharT, class _Traits, class _Allocator> @@ -2714,7 +2714,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos, size_type __n) if (__n) { pointer __p = __get_pointer(); - __n = _STD::min(__n, __sz - __pos); + __n = _VSTD::min(__n, __sz - __pos); size_type __n_move = __sz - __pos - __n; if (__n_move != 0) traits_type::move(__p + __pos, __p + __pos + __n, __n_move); @@ -2840,7 +2840,7 @@ basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __res_arg) this->__throw_length_error(); size_type __cap = capacity(); size_type __sz = size(); - __res_arg = _STD::max(__res_arg, __sz); + __res_arg = _VSTD::max(__res_arg, __sz); __res_arg = __recommend(__res_arg); if (__res_arg != __cap) { @@ -2985,7 +2985,7 @@ basic_string<_CharT, _Traits, _Allocator>::copy(pointer __s, size_type __n, size size_type __sz = size(); if (__pos > __sz) this->__throw_out_of_range(); - size_type __rlen = _STD::min(__n, __sz - __pos); + size_type __rlen = _VSTD::min(__n, __sz - __pos); traits_type::copy(__s, data() + __pos, __rlen); return __rlen; } @@ -3005,7 +3005,7 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str) _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable<allocator_type>::value) { - _STD::swap(__r_.first(), __str.__r_.first()); + _VSTD::swap(__r_.first(), __str.__r_.first()); __swap_alloc(__alloc(), __str.__alloc()); #ifdef _LIBCPP_DEBUG __invalidate_all_iterators(); @@ -3039,7 +3039,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const_pointer __s, if (__n == 0) return __pos; const_pointer __p = data(); - const_pointer __r = _STD::search(__p + __pos, __p + __sz, __s, __s + __n, + const_pointer __r = _VSTD::search(__p + __pos, __p + __sz, __s, __s + __n, __traits_eq<traits_type>()); if (__r == __p + __sz) return npos; @@ -3094,13 +3094,13 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const_pointer __s, assert(__s != 0); #endif size_type __sz = size(); - __pos = _STD::min(__pos, __sz); + __pos = _VSTD::min(__pos, __sz); if (__n < __sz - __pos) __pos += __n; else __pos = __sz; const_pointer __p = data(); - const_pointer __r = _STD::find_end(__p, __p + __pos, __s, __s + __n, + const_pointer __r = _VSTD::find_end(__p, __p + __pos, __s, __s + __n, __traits_eq<traits_type>()); if (__n > 0 && __r == __p + __pos) return npos; @@ -3165,7 +3165,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const_pointer __s, if (__pos >= __sz || __n == 0) return npos; const_pointer __p = data(); - const_pointer __r = _STD::find_first_of(__p + __pos, __p + __sz, __s, + const_pointer __r = _VSTD::find_first_of(__p + __pos, __p + __sz, __s, __s + __n, __traits_eq<traits_type>()); if (__r == __p + __sz) return npos; @@ -3416,7 +3416,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type __sz = __str.size(); if (__pos2 > __sz) this->__throw_out_of_range(); - return compare(__pos1, __n1, __str.data() + __pos2, _STD::min(__n2, + return compare(__pos1, __n1, __str.data() + __pos2, _VSTD::min(__n2, __sz - __pos2)); } @@ -3455,8 +3455,8 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1, size_type __sz = size(); if (__pos1 > __sz || __n2 == npos) this->__throw_out_of_range(); - size_type __rlen = _STD::min(__n1, __sz - __pos1); - int __r = traits_type::compare(data() + __pos1, __s, _STD::min(__rlen, __n2)); + size_type __rlen = _VSTD::min(__n1, __sz - __pos1); + int __r = traits_type::compare(data() + __pos1, __s, _VSTD::min(__rlen, __n2)); if (__r == 0) { if (__rlen < __n2) @@ -3819,7 +3819,7 @@ _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator> operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs) { - return _STD::move(__lhs.append(__rhs)); + return _VSTD::move(__lhs.append(__rhs)); } template<class _CharT, class _Traits, class _Allocator> @@ -3827,7 +3827,7 @@ _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator> operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs) { - return _STD::move(__rhs.insert(0, __lhs)); + return _VSTD::move(__rhs.insert(0, __lhs)); } template<class _CharT, class _Traits, class _Allocator> @@ -3835,7 +3835,7 @@ _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator> operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs) { - return _STD::move(__lhs.append(__rhs)); + return _VSTD::move(__lhs.append(__rhs)); } template<class _CharT, class _Traits, class _Allocator> @@ -3843,7 +3843,7 @@ _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator> operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs) { - return _STD::move(__rhs.insert(0, __lhs)); + return _VSTD::move(__rhs.insert(0, __lhs)); } template<class _CharT, class _Traits, class _Allocator> @@ -3852,7 +3852,7 @@ basic_string<_CharT, _Traits, _Allocator> operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs) { __rhs.insert(__rhs.begin(), __lhs); - return _STD::move(__rhs); + return _VSTD::move(__rhs); } template<class _CharT, class _Traits, class _Allocator> @@ -3860,7 +3860,7 @@ _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator> operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs) { - return _STD::move(__lhs.append(__rhs)); + return _VSTD::move(__lhs.append(__rhs)); } template<class _CharT, class _Traits, class _Allocator> @@ -3869,7 +3869,7 @@ basic_string<_CharT, _Traits, _Allocator> operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs) { __lhs.push_back(__rhs); - return _STD::move(__lhs); + return _VSTD::move(__lhs); } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES |