From: Michal Jarzabek Date: Fri, 5 Aug 2016 20:45:48 +0000 (+0100) Subject: mon/MonClient.h: delete copy constr and assing op X-Git-Tag: v11.0.1~193^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7d23761f07916626d6bcf73674ed518b6ec165e7;p=ceph.git mon/MonClient.h: delete copy constr and assing op Declaring a copy constructor and assignment operator without an implementation will prevent copy and assignment, but it will be caught only during linking. Deleting them moves the checking to compile time. Signed-off-by: Michal Jarzabek --- diff --git a/src/mon/MonClient.h b/src/mon/MonClient.h index 2c7051bdb183..035b08db7c19 100644 --- a/src/mon/MonClient.h +++ b/src/mon/MonClient.h @@ -297,6 +297,8 @@ public: public: explicit MonClient(CephContext *cct_); + MonClient(const MonClient &) = delete; + MonClient& operator=(const MonClient &) = delete; ~MonClient(); int init(); @@ -459,8 +461,6 @@ private: void handle_get_version_reply(MMonGetVersionReply* m); - MonClient(const MonClient &rhs); - MonClient& operator=(const MonClient &rhs); }; #endif