From 0ab3f57a6528cce609feedeb1650e7c850beca94 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Thu, 18 Jul 2024 13:11:36 -0400 Subject: [PATCH] COMP: Remove ITK_DISALLOW_COPY_AND_MOVE from UserData struct's MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On GCC 12.2.2 (Debian): /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx: In instantiation of ‘static void itk::ImageGridSampler::MultiThreadedGenerateData(itk::MultiThreaderBase&, itk::ThreadIdType, const TInputImage&, const MaskType*, const typename Superclass::InputImageRegionType&, const SampleGridSpacingType&, std::vector::ImageSampleType>&) [with TInputImage = itk::Image; itk::ThreadIdType = unsigned int; MaskType = itk::ImageMaskSpatialObject<4, unsigned char>; typename Superclass::InputImageRegionType = itk::ImageRegion<4>; Superclass = itk::ImageSamplerBase >; SampleGridSpacingType = itk::Offset<4>; typename itk::ImageSamplerBase::ImageSampleType = itk::ImageSample >]’: /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx:277:30: required from ‘void itk::ImageGridSampler::GenerateData() [with TInputImage = itk::Image]’ /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx:253:1: required from here /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.hxx:212:12: error: no matching function for call to ‘itk::ImageGridSampler >::UserData::UserData()’ 212 | UserData userData{ inputImage, | ^~~~~~~~ /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note: candidate: ‘itk::ImageGridSampler::UserData::UserData(itk::ImageGridSampler::UserData&&) [with TInputImage = itk::Image]’ (deleted) 169 | ITK_DISALLOW_COPY_AND_MOVE(UserData); | ^~~~~~~~ /home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:397:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’ 397 | TypeName(TypeName &&) = delete; \ | ^~~~~~~~ /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note: candidate expects 1 argument, 4 provided 169 | ITK_DISALLOW_COPY_AND_MOVE(UserData); | ^~~~~~~~ /home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:397:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’ 397 | TypeName(TypeName &&) = delete; \ | ^~~~~~~~ /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note: candidate: ‘itk::ImageGridSampler::UserData::UserData(const itk::ImageGridSampler::UserData&) [with TInputImage = itk::Image]’ (deleted) 169 | ITK_DISALLOW_COPY_AND_MOVE(UserData); | ^~~~~~~~ /home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:395:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’ 395 | TypeName(const TypeName &) = delete; \ | ^~~~~~~~ /home/matt/src/elastix/Common/ImageSamplers/itkImageGridSampler.h:169:32: note: candidate expects 1 argument, 4 provided 169 | ITK_DISALLOW_COPY_AND_MOVE(UserData); | ^~~~~~~~ /home/matt/src/ITK/Modules/Core/Common/include/itkMacro.h:395:3: note: in definition of macro ‘ITK_DISALLOW_COPY_AND_MOVE’ 395 | TypeName(const TypeName &) = delete; \ | ^~~~~~~~ --- Common/ImageSamplers/itkImageFullSampler.h | 2 -- Common/ImageSamplers/itkImageGridSampler.h | 2 -- Common/ImageSamplers/itkImageRandomCoordinateSampler.h | 2 -- Common/ImageSamplers/itkImageRandomSampler.h | 2 -- Common/ImageSamplers/itkImageRandomSamplerSparseMask.h | 2 +- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Common/ImageSamplers/itkImageFullSampler.h b/Common/ImageSamplers/itkImageFullSampler.h index e38e8de28..e6a9d76f7 100644 --- a/Common/ImageSamplers/itkImageFullSampler.h +++ b/Common/ImageSamplers/itkImageFullSampler.h @@ -123,8 +123,6 @@ class ITK_TEMPLATE_EXPORT ImageFullSampler : public ImageSamplerBase WorkUnits{}; diff --git a/Common/ImageSamplers/itkImageGridSampler.h b/Common/ImageSamplers/itkImageGridSampler.h index a66d01048..6bc556f4c 100644 --- a/Common/ImageSamplers/itkImageGridSampler.h +++ b/Common/ImageSamplers/itkImageGridSampler.h @@ -166,8 +166,6 @@ class ITK_TEMPLATE_EXPORT ImageGridSampler : public ImageSamplerBase & m_RandomCoordinates; const InputImageType & m_InputImage; const InterpolatorType & m_Interpolator; diff --git a/Common/ImageSamplers/itkImageRandomSampler.h b/Common/ImageSamplers/itkImageRandomSampler.h index d672e0af5..07e3f70d6 100644 --- a/Common/ImageSamplers/itkImageRandomSampler.h +++ b/Common/ImageSamplers/itkImageRandomSampler.h @@ -89,8 +89,6 @@ class ITK_TEMPLATE_EXPORT ImageRandomSampler : public ImageRandomSamplerBase & m_RandomNumberList; const InputImageType & m_InputImage; InputImageIndexType m_RegionIndex{}; diff --git a/Common/ImageSamplers/itkImageRandomSamplerSparseMask.h b/Common/ImageSamplers/itkImageRandomSamplerSparseMask.h index 7ee92031e..ea8de98d6 100644 --- a/Common/ImageSamplers/itkImageRandomSamplerSparseMask.h +++ b/Common/ImageSamplers/itkImageRandomSamplerSparseMask.h @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomSamplerSparseMask : public ImageRandomSampl private: struct UserData { - ITK_DISALLOW_COPY_AND_MOVE(UserData); + //ITK_DISALLOW_COPY_AND_MOVE(UserData); const std::vector & m_AllValidSamples; const std::vector & m_RandomIndices;