diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 7adf7b62d57..190994f281a 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -1151,13 +1151,19 @@ template using aligned_union_t = typename aligned_union<_Len, _Types...>::type; // STRUCT TEMPLATE underlying_type -template -struct underlying_type { // determine underlying type for enum +template > +struct _Underlying_type { using type = __underlying_type(_Ty); }; template -using underlying_type_t = typename underlying_type<_Ty>::type; +struct _Underlying_type<_Ty, false> {}; + +template +struct underlying_type : _Underlying_type<_Ty> {}; // determine underlying type for enum + +template +using underlying_type_t = typename _Underlying_type<_Ty>::type; // STRUCT TEMPLATE rank template diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index 1da8c63ed42..3ebe1794020 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -149,6 +149,7 @@ // P0063R3 C11 Standard Library // P0074R0 owner_less<> // P0092R1 floor(), ceil(), round(), abs() +// P0340R3 SFINAE-Friendly underlying_type // P0414R2 shared_ptr, shared_ptr // P0418R2 atomic compare_exchange memory_order Requirements // P0435R1 Overhauling common_type