Index: base/macros.h |
diff --git a/base/macros.h b/base/macros.h |
index fa12dd2e6bca88aa06a2e425dc3a66ab83e48207..f20284f48ed3382b2f58b09d6c00370bc2cf249f 100644 |
--- a/base/macros.h |
+++ b/base/macros.h |
@@ -21,18 +21,21 @@ |
#define DISALLOW_ASSIGN(TypeName) \ |
void operator=(const TypeName&) = delete |
+#if defined(OS_LINUX) |
+// A macro to disallow the copy constructor and operator= functions. |
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
+ TypeName(const TypeName&) = delete; \ |
+ void operator=(const TypeName&) = delete |
+#else |
// A macro to disallow the copy constructor and operator= functions |
// This should be used in the private: declarations for a class |
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
TypeName(const TypeName&); \ |
void operator=(const TypeName&) |
+#endif |
// A macro to disallow all the implicit constructors, namely the |
// default constructor, copy constructor and operator= functions. |
-// |
-// This should be used in the private: declarations for a class |
-// that wants to prevent anyone from instantiating it. This is |
-// especially useful for classes containing only static methods. |
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ |
TypeName() = delete; \ |
DISALLOW_COPY_AND_ASSIGN(TypeName) |