COMP: Copy BSplineInterpolationWeightFunction::SupportSize within lambda#2742
Conversation
Copied the constexpr static data member `SupportSize` to a local variable, to prevent Clang linker errors, like: > Undefined symbols for architecture x86_64: > "itk::BSplineInterpolationWeightFunction::SupportSize", referenced from: > itk::BSplineInterpolationWeightFunction::'lambda'()::operator()() const in itkBSplineInterpolationWeightFunctionTest.cxx.o From Mac10.13-AppleClang-dbg-x86_64-static, reported by Sean McBride.
|
I'm not a big fan of Anyway, I'll test if this patch fixes things. |
Thanks for your comment @Leengit To me, the syntax On the other hand, the syntax Hope that clarifies my motivation 😃 |
|
I confirm it fixes the link error. |
You responded, so that's on you. :-) C++ is more restrictive with types conversions with
Yes, it looks like that. But I am thinking that to actually achieve that you'd have to use
Yes, I agree that |
|
@hjmjohnson @dzenanz @Leengit Thanks for your approvals! |
C++17 allows using a static constexpr member variable like `SupportSize`, without being "redeclared". The workaround of copying `SupportSize` into a local variable is no longer necessary. Reverts pull request InsightSoftwareConsortium#2742 commit 27e4815 "COMP: Copy BSplineInterpolationWeightFunction::SupportSize within lambda"
Copied the constexpr static data member
SupportSizeto a localvariable, to prevent Clang linker errors, like:
From Mac10.13-AppleClang-dbg-x86_64-static https://open.cdash.org/viewBuildError.php?type=0&buildid=7457677, reported by Sean McBride (@seanm).