ITK icon indicating copy to clipboard operation
ITK copied to clipboard

COMP: Fix implicit copy constructor definition deprecation warnings

Open jhlegarreta opened this issue 3 months ago • 3 comments

Fix implicit copy constructor definition deprecation warnings in image/mesh file reader exception classes by using explicitly the compiler-provided default implementation (together with the assignment assignment and move semantics).

Fixes:

[CTest: warning matched]
 /Users/builder/externalModules/IO/ImageBase/include/itkImageFileReaderException.h:54:3:
 warning: definition of implicit copy constructor for 'ImageFileReaderException' is deprecated because it has a user-declared destructor [-Wdeprecated]
  ~ImageFileReaderException() noexcept override;
  ^

and

[CTest: warning matched]
 /Users/builder/externalModules/IO/ImageBase/include/itkImageFileWriter.h:57:3:
 warning: definition of implicit copy constructor for 'ImageFileWriterException' is deprecated because it has a user-declared destructor [-Wdeprecated]
  ~ImageFileWriterException() noexcept override;
  ^

and

[CTest: warning matched]
 /Users/builder/externalModules/IO/MeshBase/include/itkMeshFileReaderException.h:36:3:
 warning: definition of implicit copy constructor for 'MeshFileReaderException' is deprecated because it has a user-declared destructor [-Wdeprecated]
  ~MeshFileReaderException() noexcept override;
  ^

and

[CTest: warning matched]
 /Users/builder/externalModules/IO/MeshBase/include/itkMeshFileWriterException.h:36:3:
 warning: definition of implicit copy constructor for 'MeshFileWriterException' is deprecated because it has a user-declared destructor [-Wdeprecated]
  ~MeshFileWriterException() noexcept override;
  ^

Raised for example in: https://open.cdash.org/viewBuildError.php?type=1&buildid=9587875

PR Checklist

jhlegarreta avatar May 02 '24 22:05 jhlegarreta