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.5 Change-Id: I0c0f8c4a288145d05636fb053cc260a917fcc4c5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0d0cd1fe2c4f2d90a8184ce88383bdf1ff35b338) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 0f675e0f62d03aeb3d6718147954b0368d955c71)
This commit is contained in:
parent
b8a8367e5f
commit
d2f7177d42
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user