[libxml++] C++11: NonCopyable: Use = delete instead of private.



commit d51cb2b47b71a686372c28e014371a88c01f1fc6
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jul 20 10:13:43 2015 +0200

    C++11: NonCopyable: Use = delete instead of private.

 libxml++/noncopyable.h |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/libxml++/noncopyable.h b/libxml++/noncopyable.h
index 468a6f0..d82395a 100644
--- a/libxml++/noncopyable.h
+++ b/libxml++/noncopyable.h
@@ -20,13 +20,8 @@ protected:
   NonCopyable();
   virtual ~NonCopyable();
 
-private:
-  //These are not-implemented.
-  //They are just here so we can declare them as private
-  //so that this, and any derived class, do not have
-  //copy constructors.
-  NonCopyable(const NonCopyable&);
-  NonCopyable& operator=(const NonCopyable&);
+  NonCopyable(const NonCopyable&) = delete;
+  NonCopyable& operator=(const NonCopyable&) = delete;
 };
 
 } // namespace xmlpp


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