parse/enum: detect types with underlying_type members
This commit is contained in:
parent
67c682d5a2
commit
1e1aa33b75
@ -33,6 +33,13 @@ namespace cruft::parse::enumeration {
|
||||
> { using type = std::underlying_type_t<EnumT>; };
|
||||
|
||||
|
||||
template <typename EnumT>
|
||||
struct underlying_else_identity<
|
||||
EnumT,
|
||||
std::void_t<typename EnumT::underlying_type>
|
||||
> { using type = typename underlying_else_identity<typename EnumT::underlying_type>::type; };
|
||||
|
||||
|
||||
template <typename EnumT>
|
||||
using underlying_else_identity_t = typename underlying_else_identity<EnumT>::type;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user