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