Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1257)

Unified Diff: base/macros.h

Issue 1151443003: Use "= delete" for DISALLOW_COPY and DISALLOW_ASSIGN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/macros.h
diff --git a/base/macros.h b/base/macros.h
index d9043281cf5aba6b6c6ac6b3ca5e449048aa1aa7..0325e7416510f40c700223119922b785b26bf96e 100644
--- a/base/macros.h
+++ b/base/macros.h
@@ -13,13 +13,13 @@
#include <stddef.h> // For size_t.
#include <string.h> // For memcpy.
-// Put this in the private: declarations for a class to be uncopyable.
+// Put this in the declarations for a class to be uncopyable.
#define DISALLOW_COPY(TypeName) \
- TypeName(const TypeName&)
+ TypeName(const TypeName&) = delete
-// Put this in the private: declarations for a class to be unassignable.
+// Put this in the declarations for a class to be unassignable.
#define DISALLOW_ASSIGN(TypeName) \
- void operator=(const TypeName&)
+ void operator=(const TypeName&) = delete
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698