mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Use _v traits variable aliases (C++17 feature)
This commit is contained in:
@@ -33,7 +33,7 @@ const QDBusArgument &operator >>(const QDBusArgument &arg, std::string &s);
|
||||
/*!
|
||||
* Operator for streaming enums to QDBusArgument.
|
||||
*/
|
||||
template <class E, std::enable_if_t<std::is_enum<E>::value, int> = 0>
|
||||
template <class E, std::enable_if_t<std::is_enum_v<E>, int> = 0>
|
||||
QDBusArgument &operator <<(QDBusArgument &arg, const E &value)
|
||||
{
|
||||
arg.beginStructure();
|
||||
@@ -45,7 +45,7 @@ QDBusArgument &operator <<(QDBusArgument &arg, const E &value)
|
||||
/*!
|
||||
* Operator for streaming enums from QDBusArgument.
|
||||
*/
|
||||
template <class E, std::enable_if_t<std::is_enum<E>::value, int> = 0>
|
||||
template <class E, std::enable_if_t<std::is_enum_v<E>, int> = 0>
|
||||
const QDBusArgument &operator >>(const QDBusArgument &arg, E &value)
|
||||
{
|
||||
int temp;
|
||||
|
||||
Reference in New Issue
Block a user