qxp::function_ref: reuse a constraint for the deduction guide

No functional change, just using the already-existing named constraint
instead of more enable_if fiddling.

Amends 29b65c98e720056e87334ce88a683969e57efd3d.

Pick-to: 6.5
Change-Id: Idae4962834f14e2a5273099b5611ebcbb2a54447
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 41c41b4ba58ee4a7d5f66d8f03d40b8631ba7547)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 672448c712ba7cfba41100ad79416cfd6de5756f)
This commit is contained in:
Marc Mutz 2023-12-15 16:47:15 +01:00 committed by Qt Cherry-pick Bot
parent c507e2f33e
commit b8a8367e5f

View File

@ -182,7 +182,7 @@ QT_SPECIALIZE_FUNCTION_REF(const, true );
template <
class F,
std::enable_if_t<std::is_function_v<F>, bool> = true
detail::if_function<F> = true
>
function_ref(F*) -> function_ref<F>;