Commit a69b442b authored by Zhi An Ng's avatar Zhi An Ng Committed by Commit Bot

[cleanup] Remove DISALLOW_COPY_AND_ASSIGN macro

Bug: v8:11074
Change-Id: Ic8514d33938a60ff5513463d4754fb7fc5f85491
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2569564Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71640}
parent 00968fe4
......@@ -114,21 +114,13 @@ V8_INLINE Dest bit_cast(Source const& source) {
// delete the assignment operator instead.
#define DISALLOW_ASSIGN(TypeName) TypeName& operator=(const TypeName&) = delete
// Explicitly declare the copy constructor and assignment operator as deleted.
// This also deletes the implicit move constructor and implicit move assignment
// operator, but still allows to manually define them.
// Note: This macro is deprecated and will be removed soon. Please explicitly
// delete the copy constructor and assignment operator instead.
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
DISALLOW_ASSIGN(TypeName)
// Explicitly declare all implicit constructors as deleted, namely the
// default constructor, copy constructor and operator= functions.
// This is especially useful for classes containing only static methods.
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
TypeName() = delete; \
DISALLOW_COPY_AND_ASSIGN(TypeName)
TypeName(const TypeName&) = delete; \
DISALLOW_ASSIGN(TypeName)
// Disallow copying a type, but provide default construction, move construction
// and move assignment. Especially useful for move-only structs.
......@@ -141,7 +133,8 @@ V8_INLINE Dest bit_cast(Source const& source) {
#define MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(TypeName) \
TypeName(TypeName&&) V8_NOEXCEPT = default; \
TypeName& operator=(TypeName&&) V8_NOEXCEPT = default; \
DISALLOW_COPY_AND_ASSIGN(TypeName)
TypeName(const TypeName&) = delete; \
DISALLOW_ASSIGN(TypeName)
// A macro to disallow the dynamic allocation.
// This should be used in the private: declarations for a class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment