Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageScanlineConstIterator not working with RLEImage module in ITK 5.4 rc02 #4537

Closed
jilei-hao opened this issue Mar 27, 2024 · 26 comments
Closed
Labels
type:Enhancement Improvement of existing methods or implementation

Comments

@jilei-hao
Copy link

Description

Compile time error thrown when using itkRLEImage with filters such as BinaryThresholdImageFilter. It was complaining about "no viable constructor or deduction guide for deduction of template arguments of ‘ImageScanlineConstIterator’"

Steps to Reproduce

https://github.com/jilei-hao/RLETest/tree/main

Expected behavior

Code compiles without error.

Actual behavior

When compiling target RLEImageTest

[ 50%] Building CXX object CMakeFiles/RLETest.dir/main.cxx.o
In file included from /Users/jileihao/dev/sandbox/RLETest/main.cxx:9:
In file included from /Users/jileihao/dev/itk-dev/itk/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h:21:
In file included from /Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkUnaryFunctorImageFilter.h:145:
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkUnaryFunctorImageFilter.hxx:88:30: error: no viable constructor or deduction guide for deduction of template arguments of 'ImageScanlineConstIterator'
  ImageScanlineConstIterator inputIt(inputPtr, inputRegionForThread);
                             ^
/Users/jileihao/dev/itk-dev/itk/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h:221:3: note: in instantiation of member function 'itk::UnaryFunctorImageFilter<itk::RLEImage<short, 3>, itk::Image<float, 3>, itk::Functor::BinaryThreshold<short, float>>::DynamicThreadedGenerateData' requested here
  BinaryThresholdImageFilter();
  ^
/Users/jileihao/dev/itk-dev/itk/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h:150:15: note: in instantiation of member function 'itk::BinaryThresholdImageFilter<itk::RLEImage<short, 3>, itk::Image<float, 3>>::BinaryThresholdImageFilter' requested here
  itkNewMacro(Self);
              ^
/Users/jileihao/dev/sandbox/RLETest/main.cxx:50:91: note: in instantiation of member function 'itk::BinaryThresholdImageFilter<itk::RLEImage<short, 3>, itk::Image<float, 3>>::New' requested here
    auto fltThreshold = itk::BinaryThresholdImageFilter<shortRLEImage, Float3DImageType>::New();
                                                                                          ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:106:3: note: candidate template ignored: substitution failure [with TImage = itk::RLEImage<short, 3>]: cannot reference member of primary template because deduced class template specialization 'ImageScanlineConstIterator<itk::RLEImage<short, 3>>' is instantiated from a partial specialization
  ImageScanlineConstIterator(const TImage * ptr, const RegionType & region)
  ^                                                    ~~~~~~~~~~
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:267:1: note: candidate template ignored: could not match 'SmartPointer<type-parameter-0-0>' against 'const itk::RLEImage<short, 3> *'
ImageScanlineConstIterator(SmartPointer<TImage>, const typename TImage::RegionType &)
^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:119:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageIterator<TImage> & it)
  ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:135:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageConstIterator<TImage> & it)
  ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:64:27: note: candidate function template not viable: requires 1 argument, but 2 were provided
class ITK_TEMPLATE_EXPORT ImageScanlineConstIterator : public ImageConstIterator<TImage>
                          ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:97:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ImageScanlineConstIterator()
  ^
1 error generated.
make[3]: *** [CMakeFiles/RLETest.dir/main.cxx.o] Error 1
make[2]: *** [CMakeFiles/RLETest.dir/all] Error 2
make[1]: *** [CMakeFiles/RLETest.dir/rule] Error 2
make: *** [RLETest] Error 2

When compiling target RLEIteratorTest

[ 50%] Building CXX object CMakeFiles/RLEIteratorTest.dir/RLEIteratorTest.cxx.o
/Users/jileihao/dev/sandbox/RLETest/RLEIteratorTest.cxx:13:35: error: no viable constructor or deduction guide for deduction of template arguments of 'ImageScanlineConstIterator'
  itk::ImageScanlineConstIterator it2(constRLE, constRLE->GetLargestPossibleRegion());
                                  ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:106:3: note: candidate template ignored: substitution failure [with TImage = itk::RLEImage<short, 3>]: cannot reference member of primary template because deduced class template specialization 'ImageScanlineConstIterator<itk::RLEImage<short, 3>>' is instantiated from a partial specialization
  ImageScanlineConstIterator(const TImage * ptr, const RegionType & region)
  ^                                                    ~~~~~~~~~~
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:267:1: note: candidate template ignored: could not match 'SmartPointer<type-parameter-0-0>' against 'const itk::RLEImage<short, 3> *'
ImageScanlineConstIterator(SmartPointer<TImage>, const typename TImage::RegionType &)
^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:119:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageIterator<TImage> & it)
  ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:135:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageConstIterator<TImage> & it)
  ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:64:27: note: candidate function template not viable: requires 1 argument, but 2 were provided
class ITK_TEMPLATE_EXPORT ImageScanlineConstIterator : public ImageConstIterator<TImage>
                          ^
/Users/jileihao/dev/itk-dev/itk/Modules/Core/Common/include/itkImageScanlineConstIterator.h:97:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ImageScanlineConstIterator()
  ^
1 error generated.
make[3]: *** [CMakeFiles/RLEIteratorTest.dir/RLEIteratorTest.cxx.o] Error 1
make[2]: *** [CMakeFiles/RLEIteratorTest.dir/all] Error 2
make[1]: *** [CMakeFiles/RLEIteratorTest.dir/rule] Error 2
make: *** [RLEIteratorTest] Error 2

Reproducibility

100%

Versions

ITK 5.4-rc02 with Module_RLEImage=ON

Environment

MacOS 12.7.4, Apple Clang 14.0.0, CMake 3.25.2

Additional Information

@jilei-hao jilei-hao added the type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances label Mar 27, 2024
Copy link

Thank you for contributing an issue! 🙏

Welcome to the ITK community! 🤗👋☀️

We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜
Also, please check existing open issues and consider discussion on the ITK Discourse. 📖

This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it.

@thewtex thewtex added type:Enhancement Improvement of existing methods or implementation and removed type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances labels Mar 27, 2024
@thewtex
Copy link
Member

thewtex commented Mar 27, 2024

Hi,

Thank you for the reproducible example.

Conceptually, extra work is required to make RLEImage (run-length-encoded) Image with ImageScanlineIterator.

@dzenanz
Copy link
Member

dzenanz commented Mar 27, 2024

Also, all the filters which use iterator::Value() variant which returns a reference cannot work with RLEImages.

@jilei-hao
Copy link
Author

Thanks for replying!

It used to work without problem in ITK 5.3 and before. Is there any example of the extra works needed to make it work for 5.4?

@dzenanz
Copy link
Member

dzenanz commented Mar 27, 2024

I was about to suggest implementing a specialization of itk::ImageScanlineIterator, but it already exists: https://github.com/KitwareMedical/ITKRLEImage/blob/master/include/itkRLEImageScanlineIterator.h

You might only need to #include "itkRLEImageScanlineIterator.h", possibly before filter inclusion.

@jilei-hao
Copy link
Author

@dzenanz
Copy link
Member

dzenanz commented Mar 27, 2024

I just tried this on Linux with ITK f853303, and it compiles without issue. Both main.cxx and RLEIteratorTest.cxx.

@dzenanz
Copy link
Member

dzenanz commented Mar 27, 2024

Can you try compiling with ITK master?

@jilei-hao
Copy link
Author

Still the same error for the master branch. I'll test on Windows and Linux. But making it work for Mac is also important for us.

@N-Dekker
Copy link
Contributor

Do I understand correctly that the problem only occurs on Mac? It looks like your https://github.com/jilei-hao/RLETest/tree/main compiles well on my Windows pc.

Anyway, looking at https://github.com/KitwareMedical/ITKRLEImage/blob/a3bdf29f046693dce0d6c1bc4be190e87a36e4b6/include/itkRLEImageScanlineConstIterator.h#L71 , would it possibly help if you locally replace

ImageScanlineConstIterator(const ImageType * ptr, const RegionType & region)

with

ImageScanlineConstIterator(const RLEImage<TPixel, VImageDimension, CounterType> * ptr,
                           const ImageRegion<VImageDimension> &                   region)

?

I'm not sure, but it might make it easier for the compiler to deduce the template arguments 🤷

@jilei-hao
Copy link
Author

What are the recommended compilers for itk5.4 on MacOS? It looks more like an apple compiler issue. I'm getting more issue from apple clang 14.0 on an arm machine. I can't even build ITK 5.4 with Module_RLEImage=ON and Module_MorphologicalContourInterpolation=ON

@N-Dekker
Copy link
Contributor

N-Dekker commented Mar 29, 2024

@jilei-hao I'm sorry to hear so! Do you just get more of those errors on deduction of template arguments? Or also other kinds of errors?

These are the compilers that ITK aims to support: https://github.com/InsightSoftwareConsortium/ITK/blob/1780a31476d63a3f67b97c50037bf8880224f3b9/Documentation/docs/supported_compilers.md

@jilei-hao
Copy link
Author

jilei-hao commented Mar 29, 2024

@N-Dekker Thanks for the list!
Yes, the error messages were still about template deduction. These ITK compiling errors only happens on arm mac. Here's one example:

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:97:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided

  ImageScanlineConstIterator()

  ^

In file included from /Users/huah/jhao/dev/itk-dev/ITK/Modules/Remote/MorphologicalContourInterpolation/test/itkMorphologicalContourInterpolationTestWithRLEImage.cxx:20:

In file included from /Users/huah/jhao/dev/itk-dev/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.h:264:

In file included from /Users/huah/jhao/dev/itk-dev/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.hxx:33:

In file included from /Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageAlgorithm.h:221:

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageAlgorithm.hxx:40:37: error: no viable constructor or deduction guide for deduction of template arguments of 'ImageScanlineIterator'

    itk::ImageScanlineIterator      ot(outImage, outRegion);

                                    ^

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageScanlineIterator.h:66:3: note: candidate template ignored: substitution failure [with TImage = itk::RLEImage<unsigned char, 4>]: cannot reference member of primary template because deduced class template specialization 'ImageScanlineIterator<itk::RLEImage<unsigned char, 4>>' is instantiated from a partial specialization

  ImageScanlineIterator(TImage * ptr, const RegionType & region);

  ^                                         ~~~~~~~~~~

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageScanlineIterator.h:102:1: note: candidate template ignored: could not match 'SmartPointer<TImage>' against 'itk::RLEImage<unsigned char, 4> *'

ImageScanlineIterator(SmartPointer<TImage>, const typename TImage::RegionType &)->ImageScanlineIterator<TImage>;

^

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageScanlineIterator.h:74:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided

  ImageScanlineIterator(const ImageIterator<TImage> & it);

  ^

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageScanlineIterator.h:95:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided

  ImageScanlineIterator(const ImageScanlineConstIterator<TImage> & it);

  ^

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageScanlineIterator.h:42:27: note: candidate function template not viable: requires 1 argument, but 2 were provided

class ITK_TEMPLATE_EXPORT ImageScanlineIterator : public ImageScanlineConstIterator<TImage>

                          ^

/Users/huah/jhao/dev/itk-dev/ITK/Modules/Core/Common/include/itkImageScanlineIterator.h:62:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided

  ImageScanlineIterator() = default;

@N-Dekker
Copy link
Contributor

Do all those errors specifically occur when trying to use those iterators with RLEImage? And does the adjustment that I suggested at #4537 (comment) fix any of those errors at all?

@jilei-hao
Copy link
Author

Just tried but it did not fix the issue.

@jilei-hao
Copy link
Author

Same issue also occurs for llvm clang 17.0.6

@dzenanz
Copy link
Member

dzenanz commented Mar 29, 2024

What are the recommended compilers for itk5.4 on MacOS? It looks more like an apple compiler issue. I'm getting more issue from apple clang 14.0 on an arm machine. I can't even build ITK 5.4 with Module_RLEImage=ON and Module_MorphologicalContourInterpolation=ON

@thewtex has an ARM Mac, he might be able to help, assuming he can spare the time.

@N-Dekker
Copy link
Contributor

N-Dekker commented Mar 30, 2024

@jilei-hao Can you please try the same adjustment to both ImageScanlineConstIterator and ImageScanlineIterator, as I suggested at #4537 (comment)

So also in the "non-const" itkRLEImageScanlineIterator.h, at https://github.com/KitwareMedical/ITKRLEImage/blob/a3bdf29f046693dce0d6c1bc4be190e87a36e4b6/include/itkRLEImageScanlineIterator.h#L59

Replace:

ImageScanlineIterator(ImageType * ptr, const RegionType & region)

with:

ImageScanlineIterator(RLEImage<TPixel, VImageDimension, CounterType> * ptr,
                      const ImageRegion<VImageDimension> &             region)

Just like you did in the "const" version, at https://github.com/KitwareMedical/ITKRLEImage/blob/a3bdf29f046693dce0d6c1bc4be190e87a36e4b6/include/itkRLEImageScanlineConstIterator.h#L71

Does that fix any of the compiler errors?

If that doesn't work, I think we need to add "deduction guides" to itkRLEImageScanlineIterator.h and itkRLEImageScanlineConstIterator.h

@jilei-hao
Copy link
Author

jilei-hao commented Apr 1, 2024 via email

thewtex added a commit to thewtex/ITK that referenced this issue Apr 1, 2024
With:

❯ c++ --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Addresses:

```
/Users/matt.mccormick/src/RLETest/RLEIteratorTest.cxx:15:35: error: no viable constructor or deduction guide for deduction of template arguments of 'ImageScanlineConstIterator'
  itk::ImageScanlineConstIterator it2(constRLE, constRLE->GetLargestPossibleRegion());
                                  ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:106:3: note: candidate template ignored: substitution failure [with TImage = itk::RLEImage<short>]: cannot reference member of primary template because deduced class template specialization 'ImageScanlineConstIterator<itk::RLEImage<short, 3, unsigned short>>' is instantiated from a partial specialization
  ImageScanlineConstIterator(const TImage * ptr, const RegionType & region)
  ^                                                    ~~~~~~~~~~
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:267:1: note: candidate template ignored: could not match 'SmartPointer<TImage>' against 'const itk::RLEImage<short, 3> *'
ImageScanlineConstIterator(SmartPointer<TImage>, const typename TImage::RegionType &)
^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:119:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageIterator<TImage> & it)
  ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:135:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageConstIterator<TImage> & it)
  ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:64:27: note: candidate function template not viable: requires 1 argument, but 2 were provided
class ITK_TEMPLATE_EXPORT ImageScanlineConstIterator : public ImageConstIterator<TImage>
                          ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:97:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ImageScanlineConstIterator()
  ^
```

Closes InsightSoftwareConsortium#4537.
@thewtex
Copy link
Member

thewtex commented Apr 1, 2024

@jilei-hao thanks for the reproducible test case.

Addressed in #4553.

To make the RLEIteratorTest.cxx compile, a similar fix has to be applied.

thewtex added a commit to thewtex/ITK that referenced this issue Apr 1, 2024
With:

❯ c++ --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Addresses:

```
/Users/matt.mccormick/src/RLETest/RLEIteratorTest.cxx:15:35: error: no viable constructor or deduction guide for deduction of template arguments of 'ImageScanlineConstIterator'
  itk::ImageScanlineConstIterator it2(constRLE, constRLE->GetLargestPossibleRegion());
                                  ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:106:3: note: candidate template ignored: substitution failure [with TImage = itk::RLEImage<short>]: cannot reference member of primary template because deduced class template specialization 'ImageScanlineConstIterator<itk::RLEImage<short, 3, unsigned short>>' is instantiated from a partial specialization
  ImageScanlineConstIterator(const TImage * ptr, const RegionType & region)
  ^                                                    ~~~~~~~~~~
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:267:1: note: candidate template ignored: could not match 'SmartPointer<TImage>' against 'const itk::RLEImage<short, 3> *'
ImageScanlineConstIterator(SmartPointer<TImage>, const typename TImage::RegionType &)
^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:119:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageIterator<TImage> & it)
  ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:135:3: note: candidate function template not viable: requires single argument 'it', but 2 arguments were provided
  ImageScanlineConstIterator(const ImageConstIterator<TImage> & it)
  ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:64:27: note: candidate function template not viable: requires 1 argument, but 2 were provided
class ITK_TEMPLATE_EXPORT ImageScanlineConstIterator : public ImageConstIterator<TImage>
                          ^
/Users/matt.mccormick/src/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h:97:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ImageScanlineConstIterator()
  ^
```

Closes InsightSoftwareConsortium#4537.
@jilei-hao
Copy link
Author

Great! Thanks everyone for the help!

@N-Dekker
Copy link
Contributor

N-Dekker commented Apr 1, 2024

Just trying to reproduce the problem online: https://godbolt.org/z/3zMceGezo But it still compiles at godbolt.org! 🤷

thewtex added a commit to KitwareMedical/ITKRLEImage that referenced this issue Apr 1, 2024
This addresses
InsightSoftwareConsortium/ITK#4537

In addition to SmartPointer arguments, we need a raw const pointer
version.

Suggested-by: Niels Dekker <N.Dekker@lumc.nl>
thewtex added a commit to thewtex/ITKRLEImage that referenced this issue Apr 1, 2024
This addresses
InsightSoftwareConsortium/ITK#4537

In addition to SmartPointer arguments, we need a raw const pointer
version.

Suggested-by: Niels Dekker <N.Dekker@lumc.nl>
thewtex added a commit to thewtex/ITKRLEImage that referenced this issue Apr 1, 2024
This addresses
InsightSoftwareConsortium/ITK#4537

In addition to SmartPointer arguments, we need a raw const pointer
version.

Suggested-by: Niels Dekker <N.Dekker@lumc.nl>
thewtex added a commit to thewtex/ITKRLEImage that referenced this issue Apr 1, 2024
This addresses
InsightSoftwareConsortium/ITK#4537

In addition to SmartPointer arguments, we need a raw const pointer
version.

Suggested-by: Niels Dekker <N.Dekker@lumc.nl>
@jilei-hao
Copy link
Author

Just trying to reproduce the problem online: https://godbolt.org/z/3zMceGezo But it still compiles at godbolt.org! 🤷

Hi @N-Dekker ,

I copied this code to my local and compiled it and got:

Undefined symbols for architecture x86_64:
  "itk::ImageScanlineConstIterator<itk::RLEImage<int, 2u, unsigned short> >::ImageScanlineConstIterator(itk::RLEImage<int, 2u, unsigned short> const*, itk::ImageRegion<2u> const&)", referenced from:
      ___cxx_global_var_init in simple.cxx.o
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Am I missing any configuration in my compiler or cmake settings?

@N-Dekker
Copy link
Contributor

N-Dekker commented Apr 2, 2024

@jilei-hao Thanks for trying the code that I put at https://godbolt.org/z/3zMceGezo ! Clearly that code does not (yet) reproduce the issue you found, even though I tried to make it similar! You're getting a link error, which is fine, because the errors that you reported should have appeared before linking, during the compilation phase.

It would be really interesting to know when such errors do and do not occur. We need it in order to know how to properly use class template argument deduction (CTAD).

So it would be helpful if you or anyone is able to reproduce those compile errors at https://godbolt.org Possibly by doing some adjustments to https://godbolt.org/z/3zMceGezo

dzenanz pushed a commit to KitwareMedical/ITKRLEImage that referenced this issue Apr 2, 2024
This addresses
InsightSoftwareConsortium/ITK#4537

In addition to SmartPointer arguments, we need a raw const pointer
version.

Suggested-by: Niels Dekker <N.Dekker@lumc.nl>
@jilei-hao
Copy link
Author

Closing this issue since it has been addressed by KitwareMedical/ITKRLEImage#63
Thanks again for everyone's prompt support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Enhancement Improvement of existing methods or implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants