mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Use _v traits variable aliases (C++17 feature)
This commit is contained in:
@@ -188,14 +188,14 @@ namespace BlackMisc
|
||||
//! First element casted to given type, usually the PropertIndex enum
|
||||
template<class CastType> CastType frontCasted() const
|
||||
{
|
||||
static_assert(std::is_enum<CastType>::value || std::is_integral<CastType>::value, "CastType must be an enum or integer");
|
||||
static_assert(std::is_enum_v<CastType> || std::is_integral_v<CastType>, "CastType must be an enum or integer");
|
||||
return static_cast<CastType>(frontToInt());
|
||||
}
|
||||
|
||||
//! Compare with index given by enum
|
||||
template<class EnumType> bool startsWithPropertyIndexEnum(EnumType ev) const
|
||||
{
|
||||
static_assert(std::is_enum<EnumType>::value, "Argument must be an enum");
|
||||
static_assert(std::is_enum_v<EnumType>, "Argument must be an enum");
|
||||
return this->startsWith(static_cast<int>(ev));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user