diff --git a/src/concurrent/qtconcurrentfilter.h b/src/concurrent/qtconcurrentfilter.h index dce4f35db69..2fdc8f9d0f4 100644 --- a/src/concurrent/qtconcurrentfilter.h +++ b/src/concurrent/qtconcurrentfilter.h @@ -333,7 +333,7 @@ QFuture filteredReduced(QThreadPool *pool, } template ::value, int> = 0, + std::enable_if_t, int> = 0, typename ResultType = typename QtPrivate::ReduceResultTypeHelper::type, typename InitialValueType, std::enable_if_t, int> = 0> @@ -673,7 +673,7 @@ ResultType blockingFilteredReduced(QThreadPool *pool, } template ::value, int> = 0, + std::enable_if_t, int> = 0, typename ResultType = typename QtPrivate::ReduceResultTypeHelper::type, typename InitialValueType, std::enable_if_t, int> = 0> diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h index 08966115d6d..e9154070bc8 100644 --- a/src/concurrent/qtconcurrentfunctionwrappers.h +++ b/src/concurrent/qtconcurrentfunctionwrappers.h @@ -142,24 +142,17 @@ struct ReduceResultType }; template -struct hasCallOperator : std::false_type -{ -}; +inline constexpr bool hasCallOperator_v = false; template -struct hasCallOperator> : std::true_type -{ -}; +inline constexpr bool hasCallOperator_v> = true; template -struct isIterator : std::false_type -{ -}; +inline constexpr bool isIterator_v = false; template -struct isIterator::value_type>> : std::true_type -{ -}; +inline constexpr bool isIterator_v::value_type>> = + true; template using isInvocable = std::is_invocable::value_type>; @@ -180,7 +173,7 @@ struct ReduceResultTypeHelper struct ReduceResultTypeHelper>> - && hasCallOperator>::value>> + && hasCallOperator_v>>> { using type = std::decay_t::First>; }; diff --git a/src/concurrent/qtconcurrentmap.h b/src/concurrent/qtconcurrentmap.h index 3e20f8b4dce..64e9fe938c0 100644 --- a/src/concurrent/qtconcurrentmap.h +++ b/src/concurrent/qtconcurrentmap.h @@ -352,7 +352,7 @@ template #else template::value, int> = 0, + std::enable_if_t, int> = 0, typename ResultType = typename QtPrivate::ReduceResultTypeHelper::type, typename InitialValueType, std::enable_if_t, int> = 0> @@ -739,7 +739,7 @@ template #else template ::value, int> = 0, + std::enable_if_t, int> = 0, typename ResultType = typename QtPrivate::ReduceResultTypeHelper::type, typename InitialValueType, std::enable_if_t, int> = 0>