mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 10:51:50 -05:00
Common: Clean up meta-template logic in BitField
This commit is contained in:
parent
2cdb40d709
commit
c1a9e94068
1 changed files with 3 additions and 3 deletions
|
@ -121,11 +121,11 @@ private:
|
||||||
// T is an enumeration. Note that T is wrapped within an enable_if in the
|
// T is an enumeration. Note that T is wrapped within an enable_if in the
|
||||||
// former case to workaround compile errors which arise when using
|
// former case to workaround compile errors which arise when using
|
||||||
// std::underlying_type<T>::type directly.
|
// std::underlying_type<T>::type directly.
|
||||||
typedef typename std::conditional<std::is_enum<T>::value, std::underlying_type<T>,
|
using StorageType = typename std::conditional_t<std::is_enum<T>::value, std::underlying_type<T>,
|
||||||
std::enable_if<true, T>>::type::type StorageType;
|
std::enable_if<true, T>>::type;
|
||||||
|
|
||||||
// Unsigned version of StorageType
|
// Unsigned version of StorageType
|
||||||
typedef typename std::make_unsigned<StorageType>::type StorageTypeU;
|
using StorageTypeU = std::make_unsigned_t<StorageType>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Constants to allow limited introspection of fields if needed
|
/// Constants to allow limited introspection of fields if needed
|
||||||
|
|
Loading…
Reference in a new issue