P0340R3 SFINAE-Friendly underlying_type (#284)

Resolves #11. Implemented unconditionally.
This commit is contained in:
Daniel Marshall 2019-11-12 05:20:08 +00:00 коммит произвёл Stephan T. Lavavej
Родитель eba6a71983
Коммит 1de980c54b
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -1151,13 +1151,19 @@ template <size_t _Len, class... _Types>
using aligned_union_t = typename aligned_union<_Len, _Types...>::type;
// STRUCT TEMPLATE underlying_type
template <class _Ty>
struct underlying_type { // determine underlying type for enum
template <class _Ty, bool = is_enum_v<_Ty>>
struct _Underlying_type {
using type = __underlying_type(_Ty);
};
template <class _Ty>
using underlying_type_t = typename underlying_type<_Ty>::type;
struct _Underlying_type<_Ty, false> {};
template <class _Ty>
struct underlying_type : _Underlying_type<_Ty> {}; // determine underlying type for enum
template <class _Ty>
using underlying_type_t = typename _Underlying_type<_Ty>::type;
// STRUCT TEMPLATE rank
template <class _Ty>

Просмотреть файл

@ -150,6 +150,7 @@
// P0063R3 C11 Standard Library
// P0074R0 owner_less<>
// P0092R1 <chrono> floor(), ceil(), round(), abs()
// P0340R3 SFINAE-Friendly underlying_type
// P0414R2 shared_ptr<T[]>, shared_ptr<T[N]>
// P0418R2 atomic compare_exchange memory_order Requirements
// P0435R1 Overhauling common_type