[gtkmm] C++11: gmmproc: _CLASS_GTKOBJECT(): Use = delete to make these noncopyable.



commit dc410c2df42b6530774dda9d7bb4952e43f01fc5
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Sep 22 11:08:19 2015 +0200

    C++11: gmmproc: _CLASS_GTKOBJECT(): Use = delete to make these noncopyable.
    
    Instead of private, unimplemented, copy constructors and operator=().

 tools/m4/class_gtkobject.m4 |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tools/m4/class_gtkobject.m4 b/tools/m4/class_gtkobject.m4
index 9ae4850..ea14639 100644
--- a/tools/m4/class_gtkobject.m4
+++ b/tools/m4/class_gtkobject.m4
@@ -205,6 +205,10 @@ public:
   __CPPNAME__`'(__CPPNAME__&& src) noexcept;
   __CPPNAME__& operator=(__CPPNAME__&& src) noexcept;
 
+  // noncopyable
+  __CPPNAME__`'(const __CPPNAME__&) = delete;
+  __CPPNAME__& operator=(const __CPPNAME__&) = delete;
+
 _IMPORT(SECTION_DTOR_DOCUMENTATION)
   virtual ~__CPPNAME__`'() noexcept;
 
@@ -217,10 +221,6 @@ private:')dnl endif
   friend class __CPPNAME__`'_Class;
   static CppClassType `'__BASE__`'_class_;
 
-  // noncopyable
-  __CPPNAME__`'(const __CPPNAME__&);
-  __CPPNAME__& operator=(const __CPPNAME__&);
-
 protected:
   explicit __CPPNAME__`'(const Glib::ConstructParams& construct_params);
   explicit __CPPNAME__`'(__CNAME__* castitem);


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