From 8f796bd2146ee3a2b85caa241d79f3e9e490a3ae Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 13 Aug 2011 15:03:45 +1000 Subject: [PATCH] Use deleted methods to implement nocopy --- nocopy.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nocopy.hpp b/nocopy.hpp index 590655e8..d8c2f53e 100644 --- a/nocopy.hpp +++ b/nocopy.hpp @@ -27,8 +27,8 @@ class nocopy { nocopy () { ; } private: - nocopy (const nocopy &) { ; } - nocopy& operator =(const nocopy &) { unreachable (); return *this; } + nocopy (const nocopy &) = delete; + nocopy& operator =(const nocopy &) = delete; }; #endif