Explicit delete is preferable to declaring a method private when your intention is to prevent that method from ever being used. * better compiler error messages * can't be bypassed by friendship * clearer intent This was discussed here: http://lists.llvm.org/pipermail/lldb-dev/2016-September/011394.html
diff --git a/include/lldb/lldb-defines.h b/include/lldb/lldb-defines.h index a8e6776..a1318f4 100644 --- a/include/lldb/lldb-defines.h +++ b/include/lldb/lldb-defines.h @@ -157,8 +157,8 @@ /// assignment operators in C++ classes. //---------------------------------------------------------------------- #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - TypeName(const TypeName &); \ - const TypeName &operator=(const TypeName &) + TypeName(const TypeName &) = delete; \ + const TypeName &operator=(const TypeName &) = delete #endif // #if defined(__cplusplus)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits