[libsigc++2] slot_rep: =delete copy and move operations.



commit 416fc2d6eaf3b79fbc224ad29804a2f7778477d9
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Nov 6 09:25:13 2015 +0100

    slot_rep: =delete copy and move operations.
    
    Prevent, copy and move constructors and assignment operators from
    being generated automatically. These are never used, but this
    will make sure of that.
    See https://bugzilla.gnome.org/show_bug.cgi?id=756484#c5

 sigc++/functors/slot_base.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/sigc++/functors/slot_base.h b/sigc++/functors/slot_base.h
index 89a26b0..ec7679a 100644
--- a/sigc++/functors/slot_base.h
+++ b/sigc++/functors/slot_base.h
@@ -54,6 +54,12 @@ typedef void* (*hook)(void*);
  */
 struct SIGC_API slot_rep : public trackable
 {
+  slot_rep(const slot_rep& src) = delete;
+  slot_rep& operator=(const slot_rep& src) = delete;
+
+  slot_rep(slot_rep&& src) = delete;
+  slot_rep& operator=(slot_rep&& src) = delete;
+
   /* NB: Instead of slot_rep we could inherit slot_base from trackable.
    * However, a simple benchmark seems to indicate that this slows
    * down dereferencing of slot list iterators. Martin. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]