qobjectdefs.h: optimize AreOldStyleArgs
Use a template alias instead of C++98-style inheritance. Saves one template instantiation. Pick-to: 6.5 Change-Id: I95ee9cf1e5eac1db5fc8e05cd95f5e745134214d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
ebb833d7f7
commit
b37b820ce8
@ -145,9 +145,9 @@ struct QMetaMethodReturnArgument
|
||||
namespace QtPrivate {
|
||||
namespace Invoke {
|
||||
#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0)
|
||||
template <typename... Args> struct AreOldStyleArgs :
|
||||
std::disjunction<std::is_base_of<QGenericArgument, Args>...>
|
||||
{};
|
||||
template <typename... Args>
|
||||
using AreOldStyleArgs = std::disjunction<std::is_base_of<QGenericArgument, Args>...>;
|
||||
|
||||
template <typename T, typename... Args> using IfNotOldStyleArgs =
|
||||
std::enable_if_t<!AreOldStyleArgs<Args...>::value, T>;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user