Skip to content

Commit

Permalink
STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
N-Dekker authored and dzenanz committed Oct 13, 2020
1 parent 26a5ec3 commit 7d177ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Modules/Core/Common/include/itkMacro.h
Expand Up @@ -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) \
Expand Down

0 comments on commit 7d177ca

Please sign in to comment.