@@ -2254,7 +2254,6 @@ private:
2254
2254
return __guess;
2255
2255
}
2256
2256
2257
- inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init (const value_type* __s, size_type __sz, size_type __reserve);
2258
2257
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init (const value_type* __s, size_type __sz);
2259
2258
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init (size_type __n, value_type __c);
2260
2259
@@ -2439,6 +2438,12 @@ private:
2439
2438
template <class _CharT2 , class _Traits2 , class _Allocator2 >
2440
2439
friend inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
2441
2440
operator ==(const basic_string<_CharT2, _Traits2, _Allocator2>&, const _CharT2*) _NOEXCEPT;
2441
+
2442
+ // These functions aren't used anymore but are part of out ABI, so we need to provide them in the dylib for backwards
2443
+ // compatibility
2444
+ # ifdef _LIBCPP_BUILDING_LIBRARY
2445
+ void __init (const value_type* __s, size_type __sz, size_type __reserve);
2446
+ # endif
2442
2447
};
2443
2448
2444
2449
// These declarations must appear before any functions are implicitly used
@@ -2490,30 +2495,6 @@ basic_string(from_range_t, _Range&&, _Allocator = _Allocator())
2490
2495
-> basic_string<ranges::range_value_t<_Range>, char_traits<ranges::range_value_t<_Range>>, _Allocator>;
2491
2496
# endif
2492
2497
2493
- template <class _CharT , class _Traits , class _Allocator >
2494
- _LIBCPP_CONSTEXPR_SINCE_CXX20 void
2495
- basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz, size_type __reserve) {
2496
- if (__libcpp_is_constant_evaluated ())
2497
- __rep_ = __rep ();
2498
- if (__reserve > max_size ())
2499
- __throw_length_error ();
2500
- pointer __p;
2501
- if (__fits_in_sso (__reserve)) {
2502
- __set_short_size (__sz);
2503
- __p = __get_short_pointer ();
2504
- } else {
2505
- auto __allocation = std::__allocate_at_least (__alloc_, __recommend (__reserve) + 1 );
2506
- __p = __allocation.ptr ;
2507
- __begin_lifetime (__p, __allocation.count );
2508
- __set_long_pointer (__p);
2509
- __set_long_cap (__allocation.count );
2510
- __set_long_size (__sz);
2511
- }
2512
- traits_type::copy (std::__to_address (__p), __s, __sz);
2513
- traits_type::assign (__p[__sz], value_type ());
2514
- __annotate_new (__sz);
2515
- }
2516
-
2517
2498
template <class _CharT , class _Traits , class _Allocator >
2518
2499
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
2519
2500
basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz) {
0 commit comments