summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2025-01-08 14:57:04 +0100
committerMarc Mutz <marc.mutz@qt.io>2025-01-13 23:08:09 +0000
commit74b875641f40b15a4a59a0c55cd79c251b49c05e (patch)
treeb7ca5852cecd43b1208087817080aee484896e08
parenta930fb758d71ef6bf353e8fd8078de2335c32085 (diff)
function_ref_base: honor the RO5
I'm not entirely sure why function_ref_base declares its destructor. I guess it's declared in order to make it protected, because the class is non-polymorphic and inherited by function_ref, and one may want to avoid slicing. On the other hand, function_ref_base is an implementation detail, living in a `detail` namespace; so that sounds very unlikely. In any case, the class is clearly meant to be copiable, so add back (as protected) the missing special members. Pick-to: 6.9 6.8 6.5 Change-Id: Ibf909e1746e65eecf8b8990839a6e4c9eb56ca13 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r--src/corelib/global/qxpfunctional.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qxpfunctional.h b/src/corelib/global/qxpfunctional.h
index cbeef8b2932..320ca5417c8 100644
--- a/src/corelib/global/qxpfunctional.h
+++ b/src/corelib/global/qxpfunctional.h
@@ -73,6 +73,10 @@ class function_ref_base
{
protected:
~function_ref_base() = default;
+ function_ref_base(const function_ref_base &) = default;
+ function_ref_base(function_ref_base &&) = default;
+ function_ref_base &operator=(const function_ref_base &) = default;
+ function_ref_base &operator=(function_ref_base &&) = default;
using BoundEntityType = detail::BoundEntityType<Const>;