Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
libcxx/include/string
Show First 20 Lines • Show All 836 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
_NOEXCEPT | _NOEXCEPT | ||||
#endif | #endif | ||||
: __r_(__default_init_tag(), __a) { | : __r_(__default_init_tag(), __a) { | ||||
std::__debug_db_insert_c(this); | std::__debug_db_insert_c(this); | ||||
__default_init(); | __default_init(); | ||||
} | } | ||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str); | _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str) | ||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str, const allocator_type& __a); | : __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc())) { | ||||
if (!__str.__is_long()) | |||||
__r_.first() = __str.__r_.first(); | |||||
else | |||||
__init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str, const allocator_type& __a) | |||||
: __r_(__default_init_tag(), __a) { | |||||
if (!__str.__is_long()) | |||||
__r_.first() = __str.__r_.first(); | |||||
else | |||||
__init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
#ifndef _LIBCPP_CXX03_LANG | #ifndef _LIBCPP_CXX03_LANG | ||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str) | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str) | ||||
# if _LIBCPP_STD_VER <= 14 | # if _LIBCPP_STD_VER <= 14 | ||||
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value) | _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value) | ||||
# else | # else | ||||
_NOEXCEPT | _NOEXCEPT | ||||
# endif | # endif | ||||
Show All 24 Lines | #endif // _LIBCPP_CXX03_LANG | ||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s) | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s) | ||||
: __r_(__default_init_tag(), __default_init_tag()) { | : __r_(__default_init_tag(), __default_init_tag()) { | ||||
_LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr"); | _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr"); | ||||
__init(__s, traits_type::length(__s)); | __init(__s, traits_type::length(__s)); | ||||
std::__debug_db_insert_c(this); | std::__debug_db_insert_c(this); | ||||
} | } | ||||
template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0> | template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0> | ||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, const _Allocator& __a); | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, const _Allocator& __a) | ||||
: __r_(__default_init_tag(), __a) { | |||||
_LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*, allocator) detected nullptr"); | |||||
__init(__s, traits_type::length(__s)); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
#if _LIBCPP_STD_VER >= 23 | #if _LIBCPP_STD_VER >= 23 | ||||
basic_string(nullptr_t) = delete; | basic_string(nullptr_t) = delete; | ||||
#endif | #endif | ||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, size_type __n) | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, size_type __n) | ||||
: __r_(__default_init_tag(), __default_init_tag()) { | : __r_(__default_init_tag(), __default_init_tag()) { | ||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr"); | _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr"); | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | basic_string(basic_string&& __str, size_type __pos, size_type __n, const _Allocator& __alloc = _Allocator()) | ||||
std::__debug_db_insert_c(this); | std::__debug_db_insert_c(this); | ||||
if (__is_long()) | if (__is_long()) | ||||
std::__debug_db_swap(this, &__str); | std::__debug_db_swap(this, &__str); | ||||
} | } | ||||
#endif | #endif | ||||
template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0> | template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0> | ||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c, const _Allocator& __a); | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c, const _Allocator& __a) | ||||
: __r_(__default_init_tag(), __a) { | |||||
__init(__n, __c); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | _LIBCPP_CONSTEXPR_SINCE_CXX20 | ||||
basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Allocator& __a = _Allocator()); | basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Allocator& __a = _Allocator()) | ||||
: __r_(__default_init_tag(), __a) { | |||||
size_type __str_sz = __str.size(); | |||||
if (__pos > __str_sz) | |||||
__throw_out_of_range(); | |||||
__init(__str.data() + __pos, std::min(__n, __str_sz - __pos)); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 | ||||
basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator()) | basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator()) | ||||
: __r_(__default_init_tag(), __a) { | : __r_(__default_init_tag(), __a) { | ||||
size_type __str_sz = __str.size(); | size_type __str_sz = __str.size(); | ||||
if (__pos > __str_sz) | if (__pos > __str_sz) | ||||
__throw_out_of_range(); | __throw_out_of_range(); | ||||
__init(__str.data() + __pos, __str_sz - __pos); | __init(__str.data() + __pos, __str_sz - __pos); | ||||
std::__debug_db_insert_c(this); | std::__debug_db_insert_c(this); | ||||
} | } | ||||
template <class _Tp, | template <class _Tp, | ||||
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | ||||
!__is_same_uncvref<_Tp, basic_string>::value, int> = 0> | !__is_same_uncvref<_Tp, basic_string>::value, | ||||
int> = 0> | |||||
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 | _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 | ||||
Mordante: Has this change an effect due to the `_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS`? | |||||
No, I missed these ones in D128081. philnik: No, I missed these ones in D128081. | |||||
Thanks. Mordante: Thanks. | |||||
basic_string(const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a = allocator_type()); | basic_string(const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a = allocator_type()) | ||||
: __r_(__default_init_tag(), __a) { | |||||
__self_view __sv0 = __t; | |||||
__self_view __sv = __sv0.substr(__pos, __n); | |||||
__init(__sv.data(), __sv.size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _Tp, | template <class _Tp, | ||||
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | ||||
!__is_same_uncvref<_Tp, basic_string>::value, int> = 0> | !__is_same_uncvref<_Tp, basic_string>::value, | ||||
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string( | int> = 0> | ||||
const _Tp& __t); | _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) | ||||
: __r_(__default_init_tag(), __default_init_tag()) { | |||||
__self_view __sv = __t; | |||||
__init(__sv.data(), __sv.size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _Tp, | template <class _Tp, | ||||
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | ||||
!__is_same_uncvref<_Tp, basic_string>::value, int> = 0> | !__is_same_uncvref<_Tp, basic_string>::value, | ||||
int> = 0> | |||||
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string( | _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string( | ||||
const _Tp& __t, const allocator_type& __a); | const _Tp& __t, const allocator_type& __a) | ||||
: __r_(__default_init_tag(), __a) { | |||||
__self_view __sv = __t; | |||||
__init(__sv.data(), __sv.size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _InputIterator, __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, int> = 0> | template <class _InputIterator, __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, int> = 0> | ||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(_InputIterator __first, _InputIterator __last) | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(_InputIterator __first, _InputIterator __last) | ||||
: __r_(__default_init_tag(), __default_init_tag()) { | : __r_(__default_init_tag(), __default_init_tag()) { | ||||
__init(__first, __last); | __init(__first, __last); | ||||
std::__debug_db_insert_c(this); | std::__debug_db_insert_c(this); | ||||
} | } | ||||
Show All 14 Lines | #ifndef _LIBCPP_CXX03_LANG | ||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(initializer_list<_CharT> __il, const _Allocator& __a) | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(initializer_list<_CharT> __il, const _Allocator& __a) | ||||
: __r_(__default_init_tag(), __a) { | : __r_(__default_init_tag(), __a) { | ||||
__init(__il.begin(), __il.end()); | __init(__il.begin(), __il.end()); | ||||
std::__debug_db_insert_c(this); | std::__debug_db_insert_c(this); | ||||
} | } | ||||
#endif // _LIBCPP_CXX03_LANG | #endif // _LIBCPP_CXX03_LANG | ||||
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string(); | inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string() { | ||||
std::__debug_db_erase_c(this); | |||||
if (__is_long()) | |||||
__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); | |||||
} | |||||
Not Done ReplyInline ActionsThis changes the indention. Mordante: This changes the indention. | |||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 | ||||
operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); } | operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); } | ||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const basic_string& __str); | _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const basic_string& __str); | ||||
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | ||||
!__is_same_uncvref<_Tp, basic_string>::value, int> = 0> | !__is_same_uncvref<_Tp, basic_string>::value, int> = 0> | ||||
▲ Show 20 Lines • Show All 1,021 Lines • ▼ Show 20 Lines | else | ||||
__set_long_cap(__allocation.count); | __set_long_cap(__allocation.count); | ||||
__set_long_size(__sz); | __set_long_size(__sz); | ||||
} | } | ||||
traits_type::copy(std::__to_address(__p), __s, __sz); | traits_type::copy(std::__to_address(__p), __s, __sz); | ||||
traits_type::assign(__p[__sz], value_type()); | traits_type::assign(__p[__sz], value_type()); | ||||
} | } | ||||
template <class _CharT, class _Traits, class _Allocator> | template <class _CharT, class _Traits, class _Allocator> | ||||
template <__enable_if_t<__is_allocator<_Allocator>::value, int> > | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | |||||
basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, const _Allocator& __a) | |||||
: __r_(__default_init_tag(), __a) | |||||
{ | |||||
_LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*, allocator) detected nullptr"); | |||||
__init(__s, traits_type::length(__s)); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | |||||
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str) | |||||
: __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc())) | |||||
{ | |||||
if (!__str.__is_long()) | |||||
__r_.first() = __str.__r_.first(); | |||||
else | |||||
__init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), | |||||
__str.__get_long_size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | |||||
basic_string<_CharT, _Traits, _Allocator>::basic_string( | |||||
const basic_string& __str, const allocator_type& __a) | |||||
: __r_(__default_init_tag(), __a) | |||||
{ | |||||
if (!__str.__is_long()) | |||||
__r_.first() = __str.__r_.first(); | |||||
else | |||||
__init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), | |||||
__str.__get_long_size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | _LIBCPP_CONSTEXPR_SINCE_CXX20 | ||||
void basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external( | void basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external( | ||||
const value_type* __s, size_type __sz) { | const value_type* __s, size_type __sz) { | ||||
if (__libcpp_is_constant_evaluated()) | if (__libcpp_is_constant_evaluated()) | ||||
__r_.first() = __rep(); | __r_.first() = __rep(); | ||||
pointer __p; | pointer __p; | ||||
if (__fits_in_sso(__sz)) { | if (__fits_in_sso(__sz)) { | ||||
Show All 37 Lines | else | ||||
__set_long_cap(__allocation.count); | __set_long_cap(__allocation.count); | ||||
__set_long_size(__n); | __set_long_size(__n); | ||||
} | } | ||||
traits_type::assign(std::__to_address(__p), __n, __c); | traits_type::assign(std::__to_address(__p), __n, __c); | ||||
traits_type::assign(__p[__n], value_type()); | traits_type::assign(__p[__n], value_type()); | ||||
} | } | ||||
template <class _CharT, class _Traits, class _Allocator> | template <class _CharT, class _Traits, class _Allocator> | ||||
template <__enable_if_t<__is_allocator<_Allocator>::value, int> > | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | |||||
basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c, const _Allocator& __a) | |||||
: __r_(__default_init_tag(), __a) | |||||
{ | |||||
__init(__n, __c); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | |||||
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, | |||||
size_type __pos, size_type __n, | |||||
const _Allocator& __a) | |||||
: __r_(__default_init_tag(), __a) | |||||
{ | |||||
size_type __str_sz = __str.size(); | |||||
if (__pos > __str_sz) | |||||
__throw_out_of_range(); | |||||
__init(__str.data() + __pos, std::min(__n, __str_sz - __pos)); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
template <class _Tp, | |||||
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | |||||
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value, | |||||
int> > | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>::basic_string( | |||||
const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a) | |||||
: __r_(__default_init_tag(), __a) { | |||||
__self_view __sv0 = __t; | |||||
__self_view __sv = __sv0.substr(__pos, __n); | |||||
__init(__sv.data(), __sv.size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
template <class _Tp, | |||||
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | |||||
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value, | |||||
int> > | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp& __t) | |||||
: __r_(__default_init_tag(), __default_init_tag()) { | |||||
__self_view __sv = __t; | |||||
__init(__sv.data(), __sv.size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
template <class _Tp, | |||||
__enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | |||||
!__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value, | |||||
int> > | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | |||||
basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp& __t, const _Allocator& __a) | |||||
: __r_(__default_init_tag(), __a) { | |||||
__self_view __sv = __t; | |||||
__init(__sv.data(), __sv.size()); | |||||
std::__debug_db_insert_c(this); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
template <class _InputIterator, __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value, int> > | template <class _InputIterator, __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value, int> > | ||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | _LIBCPP_CONSTEXPR_SINCE_CXX20 | ||||
void basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _InputIterator __last) | void basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _InputIterator __last) | ||||
{ | { | ||||
__default_init(); | __default_init(); | ||||
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS | #ifndef _LIBCPP_HAS_NO_EXCEPTIONS | ||||
try | try | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | catch (...) | ||||
__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); | __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); | ||||
throw; | throw; | ||||
} | } | ||||
#endif // _LIBCPP_HAS_NO_EXCEPTIONS | #endif // _LIBCPP_HAS_NO_EXCEPTIONS | ||||
} | } | ||||
template <class _CharT, class _Traits, class _Allocator> | template <class _CharT, class _Traits, class _Allocator> | ||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | _LIBCPP_CONSTEXPR_SINCE_CXX20 | ||||
basic_string<_CharT, _Traits, _Allocator>::~basic_string() | |||||
{ | |||||
std::__debug_db_erase_c(this); | |||||
if (__is_long()) | |||||
__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); | |||||
} | |||||
template <class _CharT, class _Traits, class _Allocator> | |||||
_LIBCPP_CONSTEXPR_SINCE_CXX20 | |||||
void | void | ||||
basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace | basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace | ||||
(size_type __old_cap, size_type __delta_cap, size_type __old_sz, | (size_type __old_cap, size_type __delta_cap, size_type __old_sz, | ||||
size_type __n_copy, size_type __n_del, size_type __n_add, const value_type* __p_new_stuff) | size_type __n_copy, size_type __n_del, size_type __n_add, const value_type* __p_new_stuff) | ||||
{ | { | ||||
size_type __ms = max_size(); | size_type __ms = max_size(); | ||||
if (__delta_cap > __ms - __old_cap - 1) | if (__delta_cap > __ms - __old_cap - 1) | ||||
__throw_length_error(); | __throw_length_error(); | ||||
▲ Show 20 Lines • Show All 2,166 Lines • Show Last 20 Lines |
Has this change an effect due to the _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS?