[cleanup] Remove DISALLOW_COPY_AND_ASSIGN macro

Bug: v8:11074
Change-Id: Ic8514d33938a60ff5513463d4754fb7fc5f85491
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2569564
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71640}
This commit is contained in:
Zhi An Ng 2020-12-03 07:31:25 +00:00 committed by Commit Bot
parent 00968fe450
commit a69b442bc6

View File

@ -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