[glibmm] gmmproc: _CLASS_OPAQUE_REFCOUNTED: Use = delete for the default constructor.



commit 90f5049d15ae59878392571d6841ac38dee2d978
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Aug 22 11:36:07 2015 +0200

    gmmproc: _CLASS_OPAQUE_REFCOUNTED: Use = delete for the default constructor.
    
    And move it (and the = deleted copy operations) to public.

 tools/m4/class_opaque_refcounted.m4 |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/tools/m4/class_opaque_refcounted.m4 b/tools/m4/class_opaque_refcounted.m4
index 847ac3b..aae4f94 100644
--- a/tools/m4/class_opaque_refcounted.m4
+++ b/tools/m4/class_opaque_refcounted.m4
@@ -166,15 +166,17 @@ ifelse(__OPAQUE_FUNC_NEW,NONE,`dnl
   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when 
directly setting fields in structs.
   __CNAME__* gobj_copy() const;
 
-protected:
-  // Do not derive this.  __NAMESPACE__::__CPPNAME__ can neither be constructed nor deleted.
-  __CPPNAME__`'();
-  void operator delete(void*, std::size_t);
+  __CPPNAME__`'() = delete;
 
   // noncopyable
   __CPPNAME__`'(const __CPPNAME__&) = delete;
   __CPPNAME__& operator=(const __CPPNAME__&) = delete;
 
+protected:
+  // Do not derive this.  __NAMESPACE__::__CPPNAME__ can neither be constructed nor deleted.
+
+  void operator delete(void*, std::size_t);
+
 private:
 _IMPORT(SECTION_CLASS2)
 ')


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