aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/string
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:40 +0300
commit5d50718e66d9c037dc587a0211110b7d25a66185 (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /contrib/libs/cxxsupp/libcxx/include/string
parenta6a92afe03e02795227d2641b49819b687f088f8 (diff)
downloadydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/string')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string110
1 files changed, 55 insertions, 55 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/string b/contrib/libs/cxxsupp/libcxx/include/string
index 1a951b9d25..4f3309fea9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string
+++ b/contrib/libs/cxxsupp/libcxx/include/string
@@ -880,7 +880,7 @@ public:
template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
basic_string(const _Tp& __t, size_type __pos, size_type __n,
- const allocator_type& __a = allocator_type());
+ const allocator_type& __a = allocator_type());
template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value> >
@@ -2379,18 +2379,18 @@ template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_external(
const value_type* __s, size_type __n) {
- size_type __cap = capacity();
+ size_type __cap = capacity();
if (__cap >= __n) {
- value_type* __p = _VSTD::__to_address(__get_pointer());
- traits_type::move(__p, __s, __n);
- traits_type::assign(__p[__n], value_type());
- __set_size(__n);
- __invalidate_iterators_past(__n);
+ value_type* __p = _VSTD::__to_address(__get_pointer());
+ traits_type::move(__p, __s, __n);
+ traits_type::assign(__p[__n], value_type());
+ __set_size(__n);
+ __invalidate_iterators_past(__n);
} else {
- size_type __sz = size();
- __grow_by_and_replace(__cap, __n - __cap, __sz, 0, __sz, __n, __s);
- }
- return *this;
+ size_type __sz = size();
+ __grow_by_and_replace(__cap, __n - __cap, __sz, 0, __sz, __n, __s);
+ }
+ return *this;
}
template <class _CharT, class _Traits, class _Allocator>
@@ -2495,7 +2495,7 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, tr
}
#endif
}
- __move_assign_alloc(__str);
+ __move_assign_alloc(__str);
__r_.first() = __str.__r_.first();
__str.__set_short_size(0);
traits_type::assign(__str.__get_short_pointer()[0], value_type());
@@ -3219,7 +3219,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos,
} else {
__erase_external_with_move(__pos, __n);
}
- return *this;
+ return *this;
}
template <class _CharT, class _Traits, class _Allocator>
@@ -3386,55 +3386,55 @@ basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target
size_type __cap = capacity();
size_type __sz = size();
- pointer __new_data, __p;
- bool __was_long, __now_long;
+ pointer __new_data, __p;
+ bool __was_long, __now_long;
if (__target_capacity == __min_cap - 1)
- {
- __was_long = true;
- __now_long = false;
- __new_data = __get_short_pointer();
- __p = __get_long_pointer();
- }
- else
- {
- if (__target_capacity > __cap)
- __new_data = __alloc_traits::allocate(__alloc(), __target_capacity+1);
+ {
+ __was_long = true;
+ __now_long = false;
+ __new_data = __get_short_pointer();
+ __p = __get_long_pointer();
+ }
+ else
+ {
+ if (__target_capacity > __cap)
+ __new_data = __alloc_traits::allocate(__alloc(), __target_capacity+1);
else
{
- #ifndef _LIBCPP_NO_EXCEPTIONS
- try
+ #ifndef _LIBCPP_NO_EXCEPTIONS
+ try
{
#endif // _LIBCPP_NO_EXCEPTIONS
__new_data = __alloc_traits::allocate(__alloc(), __target_capacity+1);
- #ifndef _LIBCPP_NO_EXCEPTIONS
+ #ifndef _LIBCPP_NO_EXCEPTIONS
+ }
+ catch (...)
+ {
+ return;
}
- catch (...)
- {
- return;
- }
- #else // _LIBCPP_NO_EXCEPTIONS
- if (__new_data == nullptr)
- return;
+ #else // _LIBCPP_NO_EXCEPTIONS
+ if (__new_data == nullptr)
+ return;
#endif // _LIBCPP_NO_EXCEPTIONS
}
- __now_long = true;
- __was_long = __is_long();
- __p = __get_pointer();
- }
- traits_type::copy(_VSTD::__to_address(__new_data),
- _VSTD::__to_address(__p), size()+1);
- if (__was_long)
- __alloc_traits::deallocate(__alloc(), __p, __cap+1);
- if (__now_long)
- {
+ __now_long = true;
+ __was_long = __is_long();
+ __p = __get_pointer();
+ }
+ traits_type::copy(_VSTD::__to_address(__new_data),
+ _VSTD::__to_address(__p), size()+1);
+ if (__was_long)
+ __alloc_traits::deallocate(__alloc(), __p, __cap+1);
+ if (__now_long)
+ {
__set_long_cap(__target_capacity+1);
- __set_long_size(__sz);
- __set_long_pointer(__new_data);
+ __set_long_size(__sz);
+ __set_long_pointer(__new_data);
}
- else
- __set_short_size(__sz);
- __invalidate_all_iterators();
-}
+ else
+ __set_short_size(__sz);
+ __invalidate_all_iterators();
+}
template <class _CharT, class _Traits, class _Allocator>
inline
@@ -4458,8 +4458,8 @@ _LIBCPP_FUNC_VIS wstring to_wstring(long double __val);
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_TEMPLATE_DATA_VIS
-const typename basic_string<_CharT, _Traits, _Allocator>::size_type
- basic_string<_CharT, _Traits, _Allocator>::npos;
+const typename basic_string<_CharT, _Traits, _Allocator>::size_type
+ basic_string<_CharT, _Traits, _Allocator>::npos;
template <class _CharT, class _Allocator>
struct _LIBCPP_TEMPLATE_VIS
@@ -4507,7 +4507,7 @@ getline(basic_istream<_CharT, _Traits>&& __is,
basic_string<_CharT, _Traits, _Allocator>& __str);
#if _LIBCPP_STD_VER > 17
-template <class _CharT, class _Traits, class _Allocator, class _Up>
+template <class _CharT, class _Traits, class _Allocator, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
typename basic_string<_CharT, _Traits, _Allocator>::size_type
erase(basic_string<_CharT, _Traits, _Allocator>& __str, const _Up& __v) {
@@ -4516,7 +4516,7 @@ inline _LIBCPP_INLINE_VISIBILITY
return __old_size - __str.size();
}
-template <class _CharT, class _Traits, class _Allocator, class _Predicate>
+template <class _CharT, class _Traits, class _Allocator, class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
typename basic_string<_CharT, _Traits, _Allocator>::size_type
erase_if(basic_string<_CharT, _Traits, _Allocator>& __str,