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

Example compilation issue with template spec #1474

Closed
kerautret opened this issue Apr 9, 2020 · 3 comments
Closed

Example compilation issue with template spec #1474

kerautret opened this issue Apr 9, 2020 · 3 comments
Assignees

Comments

@kerautret
Copy link
Member

Probably from the 10.15.4 update with last Xcode I get this error:

In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__string:56:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2567:5: error:
static_assert failed due to requirement
'__is_forward_iterator<DGtal::ConstIteratorAdapter<DGtal::HyperRectDomain_Iterator<DGtal::PointVector<2,
int, std::__1::array<int, 2> > >, DGtal::DistanceTransformation<DGtal::SpaceND<2, int>,
DGtal::functors::SimpleThresholdForegroundPredicate<DGtal::ImageContainerBySTLVector<DGtal::HyperRectDomain<DGtal::SpaceND<2,
int> >, unsigned int> >, DGtal::ExactPredicateLpSeparableMetric<DGtal::SpaceND<2, int>, 2, long
long>, DGtal::ImageContainerBySTLVector<DGtal::HyperRectDomain<DGtal::SpaceND<2, int> >,
DGtal::PointVector<2, int, std::__1::array<int, 2> > > >, double> >::value' "std::max_element
requires a ForwardIterator"
static_assert(__is_forward_iterator<_ForwardIterator>::value,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2586:19: note:
in instantiation of function template specialization
'std::__1::max_element<DGtal::ConstIteratorAdapter<DGtal::HyperRectDomain_Iterator<DGtal::PointVector<2,
int, std::__1::array<int, 2> > >, DGtal::DistanceTransformation<DGtal::SpaceND<2, int>,
DGtal::functors::SimpleThresholdForegroundPredicate<DGtal::ImageContainerBySTLVector<DGtal::HyperRectDomain<DGtal::SpaceND<2,
int> >, unsigned int> >, DGtal::ExactPredicateLpSeparableMetric<DGtal::SpaceND<2, int>, 2, long
long>, DGtal::ImageContainerBySTLVector<DGtal::HyperRectDomain<DGtal::SpaceND<2, int> >,
DGtal::PointVector<2, int, std::__1::array<int, 2> > > >, double>, std::__1::__less<double, double>
>' requested here
return _VSTD::max_element(__first, __last,
^
DGtal/examples/geometry/volumes/distance/toricdomainvolumetric.cpp:119:49: note:
in instantiation of function template specialization
'std::__1::max_element<DGtal::ConstIteratorAdapter<DGtal::HyperRectDomain_Iterator<DGtal::PointVector<2,
int, std::__1::array<int, 2> > >, DGtal::DistanceTransformation<DGtal::SpaceND<2, int>,
DGtal::functors::SimpleThresholdForegroundPredicate<DGtal::ImageContainerBySTLVector<DGtal::HyperRectDomain<DGtal::SpaceND<2,
int> >, unsigned int> >, DGtal::ExactPredicateLpSeparableMetric<DGtal::SpaceND<2, int>, 2, long
long>, DGtal::ImageContainerBySTLVector<DGtal::HyperRectDomain<DGtal::SpaceND<2, int> >,
DGtal::PointVector<2, int, std::__1::array<int, 2> > > >, double> >' requested here
const DTL2::Value maxv2 = * (std::max_element(dtL2.constRange().begin(), dtL2.const...
^
1 error generated.

@rolanddenis
Copy link
Member

Is that not a duplicate of #1437 ? (the __is_forward_iterator requirement that fails)

@rolanddenis
Copy link
Member

Yes it is, same file, same line. Closing...

@kerautret
Copy link
Member Author

Yes it is, same file, same line. Closing...

Sorry @rolanddenis I miss it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants