diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-12-15 11:18:05 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-12-16 09:43:40 +0100 |
commit | 0d0cd1fe2c4f2d90a8184ce88383bdf1ff35b338 (patch) | |
tree | db18d8ed4eba99fbb609b6d7c2c6a6b3250fc854 /src/corelib/global/qxpfunctional.h | |
parent | b404930e122013e76ba8fe165f3432288c051438 (diff) |
qxp::function_ref: simplify the constraint on op=(T) = delete
Drop the remove_cvref_t (T is already decayed by way of take-by-value)
and apply De Morgan's Law.
No functional change, just fewer templates to instantiate.
Amends 29b65c98e720056e87334ce88a683969e57efd3d.
Pick-to: 6.7 6.6 6.5
Change-Id: I0c0f8c4a288145d05636fb053cc260a917fcc4c5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qxpfunctional.h')
-rw-r--r-- | src/corelib/global/qxpfunctional.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/global/qxpfunctional.h b/src/corelib/global/qxpfunctional.h index 60508f6315..24e74daaea 100644 --- a/src/corelib/global/qxpfunctional.h +++ b/src/corelib/global/qxpfunctional.h @@ -141,9 +141,11 @@ public: protected: template < class T, - std::enable_if_t<std::conjunction_v< - std::negation<std::is_same<q20::remove_cvref_t<T>, function_ref_base>>, - std::negation<std::is_pointer<T>> + std::enable_if_t<std::negation_v< + std::disjunction< + std::is_same<T, function_ref_base>, + std::is_pointer<T> + > >, bool> = true > function_ref_base& operator=(T) = delete; |