@@ -719,15 +719,15 @@ struct __init_with_sentinel_tag {};
719719template <size_t _PaddingSize>
720720struct __padding {
721721 char __padding_[_PaddingSize];
722- static constexpr __padding empty () {
722+ static _LIBCPP_CONSTEXPR_SINCE_CXX20 __padding empty () {
723723 __padding __initialized = {0 };
724724 return __initialized;
725725 }
726726};
727727
728728template <>
729729struct __padding <0 > {
730- static constexpr __padding empty () {
730+ static _LIBCPP_CONSTEXPR_SINCE_CXX20 __padding empty () {
731731 __padding __initialized;
732732 return __initialized;
733733 }
@@ -840,17 +840,17 @@ private:
840840 // The __short structure has a byte-sized bitfield container at the end, and
841841 // the rest of it can be taken up by value_type. We want at least two
842842 // value_type, or more if they will fit.
843- static constexpr size_t __fit_cap = (sizeof (__long_min) - 1 ) / sizeof (value_type);
844- static constexpr size_t __min_cap = __fit_cap > 2 ? __fit_cap : 2 ;
843+ enum { __fit_cap = (sizeof (__long_min) - 1 ) / sizeof (value_type) } ;
844+ enum { __min_cap = __fit_cap > 2 ? __fit_cap : 2 } ;
845845
846846 // Now we know how many value_type will fit, calculate how much space they
847847 // take up in total; add one byte for the final bitfield container; and round
848848 // up to the nearest multiple of the alignment. That's the total size of the
849849 // structure.
850- static constexpr size_t __short_packed_size = sizeof (value_type) * __min_cap + 1 ;
850+ enum { __short_packed_size = sizeof (value_type) * __min_cap + 1 } ;
851851 union __union_alignment_check { __long_min __long_; value_type v; };
852- static constexpr size_t __union_alignment = _LIBCPP_ALIGNOF(__union_alignment_check);
853- static constexpr size_t __full_size = (__short_packed_size + __union_alignment - 1 ) & -__union_alignment;
852+ enum { __union_alignment = _LIBCPP_ALIGNOF (__union_alignment_check) } ;
853+ enum { __full_size = (__short_packed_size + __union_alignment - 1 ) & -__union_alignment } ;
854854
855855 // Now define both structures for real, with padding to ensure they are both
856856 // exactly the calculated size.
0 commit comments