From 7d177ca0c77aedb38cc8cf5561b785317617c315 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Sun, 11 Oct 2020 17:03:46 +0200 Subject: [PATCH] STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Clarifies that the macro does not just disallow copy and assign, but also move operations. Note that in this context, the term "move" refers to both move-construct and move-assign. With this commit, the old macro name will remain available, as long as `ITK_FUTURE_LEGACY_REMOVE = OFF` (which is the default). --- Modules/Core/Common/include/itkMacro.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index 05a8fc81fa1..fc6b4d0f8ae 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -355,12 +355,16 @@ namespace itk // prohibits the use of copy/move construction and copy/move assignment // functions. // -#define ITK_DISALLOW_COPY_AND_ASSIGN(TypeName) \ +#define ITK_DISALLOW_COPY_AND_MOVE(TypeName) \ TypeName(const TypeName &) = delete; \ TypeName & operator=(const TypeName &) = delete; \ TypeName(TypeName &&) = delete; \ TypeName & operator=(TypeName &&) = delete +#if !defined(ITK_FUTURE_LEGACY_REMOVE) +# define ITK_DISALLOW_COPY_AND_ASSIGN(TypeName) ITK_DISALLOW_COPY_AND_MOVE(TypeName) +#endif + /** Macro used to add standard methods to all classes, mainly type * information. */ #define itkTypeMacro(thisClass, superclass) \