Use _v traits variable aliases (C++17 feature)

This commit is contained in:
Mat Sutcliffe
2021-04-17 20:43:42 +01:00
parent 6d232756f4
commit 5d67cd9f68
32 changed files with 67 additions and 67 deletions

View File

@@ -43,8 +43,8 @@ namespace BlackGui
{
CListModelBaseNonTemplate::m_sortTieBreakers.push_front(ObjectType::keyIndex());
constexpr bool hasIntegerKey = std::is_base_of<IDatastoreObjectWithIntegerKey, ObjectType>::value && std::is_same<int, KeyType>::value;
constexpr bool hasStringKey = std::is_base_of<IDatastoreObjectWithStringKey, ObjectType>::value && std::is_base_of<QString, KeyType>::value;
constexpr bool hasIntegerKey = std::is_base_of_v<IDatastoreObjectWithIntegerKey, ObjectType> && std::is_same_v<int, KeyType>;
constexpr bool hasStringKey = std::is_base_of_v<IDatastoreObjectWithStringKey, ObjectType> && std::is_base_of_v<QString, KeyType>;
static_assert(hasIntegerKey || hasStringKey, "ObjectType needs to implement IDatastoreObjectWithXXXXKey and have appropriate KeyType");
}