@@ -751,22 +751,22 @@ struct __init_with_sentinel_tag {};
751
751
752
752
#ifdef _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
753
753
template <class _CharT , size_t __min_cap, size_t _Padding = sizeof (_CharT) - 1 >
754
- struct __short_impl {
754
+ struct __short_layout_alternate {
755
755
_CharT __data_[__min_cap];
756
756
unsigned char __padding_[_Padding];
757
757
unsigned char __size_ : 7 ;
758
758
unsigned char __is_long_ : 1 ;
759
759
};
760
760
761
761
template <class _CharT , size_t __min_cap>
762
- struct __short_impl <_CharT, __min_cap, 0 > {
762
+ struct __short_layout_alternate <_CharT, __min_cap, 0 > {
763
763
_CharT __data_[__min_cap];
764
764
unsigned char __size_ : 7 ;
765
765
unsigned char __is_long_ : 1 ;
766
766
};
767
767
#else
768
768
template <class _CharT , size_t __min_cap, size_t _Padding = sizeof (_CharT) - 1 >
769
- struct __short_impl {
769
+ struct __short_layout_classic {
770
770
struct _LIBCPP_PACKED {
771
771
unsigned char __is_long_ : 1 ;
772
772
unsigned char __size_ : 7 ;
@@ -775,7 +775,7 @@ struct __short_impl {
775
775
_CharT __data_[__min_cap];
776
776
};
777
777
template <class _CharT , size_t __min_cap>
778
- struct __short_impl <_CharT, __min_cap, 0 > {
778
+ struct __short_layout_classic <_CharT, __min_cap, 0 > {
779
779
struct _LIBCPP_PACKED {
780
780
unsigned char __is_long_ : 1 ;
781
781
unsigned char __size_ : 7 ;
@@ -930,7 +930,11 @@ private:
930
930
931
931
#endif // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
932
932
933
- using __short = __short_impl<value_type, __min_cap>;
933
+ #ifdef _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
934
+ using __short = __short_layout_alternate<value_type, __min_cap>;
935
+ #else
936
+ using __short = __short_layout_classic<value_type, __min_cap>;
937
+ #endif
934
938
static_assert (sizeof (__short) == (sizeof (value_type) * (__min_cap + 1 )), " __short has an unexpected size." );
935
939
936
940
union __rep {
0 commit comments