summaryrefslogtreecommitdiff
path: root/third_party/base/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/base/macros.h')
-rw-r--r--third_party/base/macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/third_party/base/macros.h b/third_party/base/macros.h
index 05c3132e46..b6ec161204 100644
--- a/third_party/base/macros.h
+++ b/third_party/base/macros.h
@@ -28,4 +28,10 @@
#undef COMPILE_ASSERT
#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+// 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&) = delete; \
+ void operator=(const TypeName&) = delete
+
#endif // PDFIUM_THIRD_PARTY_BASE_MACROS_H_