From: JINMEI Tatuya Date: Thu, 23 Aug 2012 16:27:46 +0000 (-0700) Subject: [2100] use boost::noncopyable to make the class noncopyable by convention X-Git-Tag: trac2351_base~115^2~3^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c16bd99c081bbdf9a16081e4fc9783edbea0cb9;p=thirdparty%2Fkea.git [2100] use boost::noncopyable to make the class noncopyable by convention --- diff --git a/src/lib/datasrc/memory/zone_table.h b/src/lib/datasrc/memory/zone_table.h index a486b6a464..b5da957eb4 100644 --- a/src/lib/datasrc/memory/zone_table.h +++ b/src/lib/datasrc/memory/zone_table.h @@ -20,6 +20,7 @@ #include #include +#include #include namespace isc { @@ -57,7 +58,7 @@ class ZoneData; /// /// This class is intended to be used as a backend for the \c MemoryDataSrc /// class, and is not intended to be used for other general purposes. -class ZoneTable { +class ZoneTable : boost::noncopyable { private: // The deleter for the zone data stored in the table. struct ZoneDataDeleter { @@ -90,17 +91,7 @@ public: const ZoneData* const zone_data; }; - /// - /// \name Constructors and Destructor. - /// - /// \b Note: - /// The copy constructor and the assignment operator are intentionally - /// defined as private, making this class non copyable. - //@{ private: - ZoneTable(const ZoneTable& source); - ZoneTable& operator=(const ZoneTable& source); - /// Constructor. /// /// An object of this class is always expected to be created by the @@ -111,7 +102,6 @@ private: /// It never throws an exception otherwise. ZoneTable(ZoneTableTree* zones) : zones_(zones) {} - //@} public: /// \brief Allocate and construct \c ZoneTable