DGtal-team / DGtal

Digital Geometry Tools and Algorithm Library
https://dgtal.org
GNU Lesser General Public License v3.0
370 stars 115 forks source link

PointPredicate refactoring + new Clone/Alias generate build issues #730

Closed dcoeurjo closed 10 years ago

dcoeurjo commented 10 years ago

Have a look to : https://travis-ci.org/DGtal-team/DGtal/jobs/13702316

related to member assignation from refs in the constructors.

dcoeurjo commented 10 years ago

Another issue with similar causes:

In file included from /Users/davidcoeurjolly/Sources/DGtal/src/DGtal/kernel/BasicPointPredicates.h:349:0, from /Users/davidcoeurjolly/Sources/DGtal/src/DGtal/kernel/domains/HyperRectDomain.h:48, from /Users/davidcoeurjolly/Sources/DGtal/src/DGtal/helpers/StdDefs.h:47, from /Users/davidcoeurjolly/Sources/DGtal/examples/geometry/volumes/distance/voronoimap2D.cpp:33: /Users/davidcoeurjolly/Sources/DGtal/src/DGtal/kernel/BasicPointPredicates.ih: In instantiation of 'DGtal::NotPointPredicate::NotPointPredicate(DGtal::ConstAlias) [with TPointPredicate = DGtal::DigitalSetBySTLSet<DGtal::HyperRectDomain<DGtal::SpaceND<2u, int> >, std::less<DGtal::PointVector<2u, int, boost::array<int, 2ul> > > >]': /Users/davidcoeurjolly/Sources/DGtal/examples/geometry/volumes/distance/voronoimap2D.cpp:79:30: required from here /Users/davidcoeurjolly/Sources/DGtal/src/DGtal/kernel/BasicPointPredicates.ih:106:18: error: cannot convert 'DGtal::ConstAlias<DGtal::DigitalSetBySTLSet<DGtal::HyperRectDomain<DGtal::SpaceND<2u, int> >, std::less<DGtal::PointVector<2u, int, boost::array<int, 2ul> > > > >' to 'const PointPredicate* {aka const DGtal::DigitalSetBySTLSet<DGtal::HyperRectDomain<DGtal::SpaceND<2u, int> >, std::less<DGtal::PointVector<2u, int, boost::array<int, 2ul> > > >*}' in initialization

JacquesOlivierLachaud commented 10 years ago

It is just that you need to apply a address operator when your data member is a pointer. I am fixing it and making a PR

JacquesOlivierLachaud commented 10 years ago

Fixed by #732