@@ -868,7 +868,7 @@ private:
868
868
__r_.first () = __rep ();
869
869
__set_short_size (__size);
870
870
} else {
871
- auto __capacity = __recommend (__size) + 1 ;
871
+ auto __capacity = __align_it<__endian_factor>( __recommend (__size) + 1 ) ;
872
872
auto __allocation = __alloc_traits::allocate (__alloc (), __capacity);
873
873
__begin_lifetime (__allocation, __capacity);
874
874
__set_long_cap (__capacity);
@@ -2202,7 +2202,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
2202
2202
__set_short_size (__sz);
2203
2203
__p = __get_short_pointer ();
2204
2204
} else {
2205
- auto __allocation = std::__allocate_at_least (__alloc (), __recommend (__reserve) + 1 );
2205
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __recommend (__reserve) + 1 ) );
2206
2206
__p = __allocation.ptr ;
2207
2207
__begin_lifetime (__p, __allocation.count );
2208
2208
__set_long_pointer (__p);
@@ -2226,7 +2226,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
2226
2226
__set_short_size (__sz);
2227
2227
__p = __get_short_pointer ();
2228
2228
} else {
2229
- auto __allocation = std::__allocate_at_least (__alloc (), __recommend (__sz) + 1 );
2229
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __recommend (__sz) + 1 ) );
2230
2230
__p = __allocation.ptr ;
2231
2231
__begin_lifetime (__p, __allocation.count );
2232
2232
__set_long_pointer (__p);
@@ -2251,7 +2251,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(const value
2251
2251
} else {
2252
2252
if (__sz > max_size ())
2253
2253
__throw_length_error ();
2254
- auto __allocation = std::__allocate_at_least (__alloc (), __recommend (__sz) + 1 );
2254
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __recommend (__sz) + 1 ) );
2255
2255
__p = __allocation.ptr ;
2256
2256
__begin_lifetime (__p, __allocation.count );
2257
2257
__set_long_pointer (__p);
@@ -2274,7 +2274,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__
2274
2274
__set_short_size (__n);
2275
2275
__p = __get_short_pointer ();
2276
2276
} else {
2277
- auto __allocation = std::__allocate_at_least (__alloc (), __recommend (__n) + 1 );
2277
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __recommend (__n) + 1 ) );
2278
2278
__p = __allocation.ptr ;
2279
2279
__begin_lifetime (__p, __allocation.count );
2280
2280
__set_long_pointer (__p);
@@ -2339,7 +2339,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init_with_size(_InputIterator __fir
2339
2339
__p = __get_short_pointer ();
2340
2340
2341
2341
} else {
2342
- auto __allocation = std::__allocate_at_least (__alloc (), __recommend (__sz) + 1 );
2342
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __recommend (__sz) + 1 ) );
2343
2343
__p = __allocation.ptr ;
2344
2344
__begin_lifetime (__p, __allocation.count );
2345
2345
__set_long_pointer (__p);
@@ -2379,7 +2379,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__
2379
2379
size_type __cap =
2380
2380
__old_cap < __ms / 2 - __alignment ? __recommend (std::max (__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1 ;
2381
2381
__annotate_delete ();
2382
- auto __allocation = std::__allocate_at_least (__alloc (), __cap + 1 );
2382
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __cap + 1 ) );
2383
2383
pointer __p = __allocation.ptr ;
2384
2384
__begin_lifetime (__p, __allocation.count );
2385
2385
if (__n_copy != 0 )
@@ -2422,7 +2422,7 @@ void _LIBCPP_CONSTEXPR_SINCE_CXX20
2422
2422
size_type __cap =
2423
2423
__old_cap < __ms / 2 - __alignment ? __recommend (std::max (__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1 ;
2424
2424
__annotate_delete ();
2425
- auto __allocation = std::__allocate_at_least (__alloc (), __cap + 1 );
2425
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __cap + 1 ) );
2426
2426
pointer __p = __allocation.ptr ;
2427
2427
__begin_lifetime (__p, __allocation.count );
2428
2428
if (__n_copy != 0 )
@@ -3255,14 +3255,14 @@ basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target
3255
3255
__p = __get_long_pointer ();
3256
3256
} else {
3257
3257
if (__target_capacity > __cap) {
3258
- auto __allocation = std::__allocate_at_least (__alloc (), __target_capacity + 1 );
3258
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __target_capacity + 1 ) );
3259
3259
__new_data = __allocation.ptr ;
3260
3260
__target_capacity = __allocation.count - 1 ;
3261
3261
} else {
3262
3262
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
3263
3263
try {
3264
3264
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
3265
- auto __allocation = std::__allocate_at_least (__alloc (), __target_capacity + 1 );
3265
+ auto __allocation = std::__allocate_at_least (__alloc (), __align_it<__endian_factor>( __target_capacity + 1 ) );
3266
3266
__new_data = __allocation.ptr ;
3267
3267
__target_capacity = __allocation.count - 1 ;
3268
3268
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0 commit comments