Compilation error with version 1.56

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation error with version 1.56

jakka30
Hello all, We are trying to move to Latest Boost version 1.56 from version 1.55. In version 1.55, everything compiles fine. When we moved to version 1.56, we are getting the following compile error with Visual Studio 2013 compiler. Could someone help us to fix this one? t:\boost\boost\geometry\algorithms\assign.hpp(155): error C2780: 'void boost::geometry::dispatch::assign<boost::geometry::point_tag,Geometry,3>::apply(Point &,const T &,const T &,const T &)' : expects 4 arguments - 3 provided 1> with 1> [ 1> Geometry=robust_point_type 1> , Point=robust_point_type 1> ] 1> t:\boost\boost\geometry\algorithms\detail\assign_values.hpp(277) : see declaration of 'boost::geometry::dispatch::assign<boost::geometry::point_tag,Geometry,3>::apply' 1> with 1> [ 1> Geometry=robust_point_type 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(70) : see reference to function template instantiation 'void boost::geometry::assign_values<RobustPoint,boost::long_long_type>(Geometry &,const Type &,const Type &)' being compiled 1> with 1> [ 1> RobustPoint=robust_point_type 1> , Geometry=robust_point_type 1> , Type=boost::long_long_type 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(154) : see reference to function template instantiation 'void boost::geometry::detail::get_rescale_policy::init_rescale_policy<point_type,robust_point_type,Geometry,factor_type>(const Geometry &,Point &,RobustPoint &,Factor &)' being compiled 1> with 1> [ 1> Geometry=QCS::Polygon3D 1> , Point=point_type 1> , RobustPoint=robust_point_type 1> , Factor=factor_type 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(277) : see reference to function template instantiation 'Policy boost::geometry::detail::get_rescale_policy::get_rescale_policy::apply(const Geometry &)' being compiled 1> with 1> [ 1> Policy=rescale_policy_type 1> , Geometry=QCS::Polygon3D 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(277) : see reference to function template instantiation 'Policy boost::geometry::detail::get_rescale_policy::get_rescale_policy::apply(const Geometry &)' being compiled 1> with 1> [ 1> Policy=rescale_policy_type 1> , Geometry=QCS::Polygon3D 1> ] 1> t:\boost\boost\geometry\algorithms\intersects.hpp(67) : see reference to function template instantiation 'Policy boost::geometry::get_rescale_policy<rescale_policy_type,Geometry>(const Geometry &)' being compiled 1> with 1> [ 1> Policy=rescale_policy_type 1> , Geometry=QCS::Polygon3D 1> ] 1> q:\lpcore\lassymbols\lppolygon.cpp(1066) : see reference to function template instantiation 'bool boost::geometry::intersects<QCS::Polygon3D<Type>>(const Geometry &)' being compiled 1> with 1> [ 1> Type=double 1> , Geometry=QCS::Polygon3D 1> ] Thanks, Suresh
Reply | Threaded
Open this post in threaded view
|

Re: Compilation error with version 1.56

Adam Wulkiewicz
Hi,

Jakka30 wrote:
Hello all, We are trying to move to Latest Boost version 1.56 from version 1.55. In version 1.55, everything compiles fine. When we moved to version 1.56, we are getting the following compile error with Visual Studio 2013 compiler. Could someone help us to fix this one?

I'll start from possible fixes/workarounds. You could:
1. wait for Boost 1.57 in which 1-argument intersects() doesn't use the code failing for non 2d Geometries.
2. define BOOST_GEOMETRY_NO_ROBUSTNESS but then the robustness upgrades would be disabled in the whole library
3. modify your local version of intersects() like this:
https://github.com/boostorg/geometry/commit/e1dfe2e5946f8be4844b089836bd48be08450f35.
It should work if you just replaced your local boost/geometry/algorithms/intersects.hpp with this file:
https://github.com/boostorg/geometry/blob/e1dfe2e5946f8be4844b089836bd48be08450f35/include/boost/geometry/algorithms/intersects.hpp
4. Since your Polygons are 3D but the support for 3D Geometries in Boost.Geometry is limited, i.e. in the case of intersects() probably (I'm guessing) only first 2 coordinates are used anyway, you could switch to 2D Polygons.

assign_values() probably shouldn't be used in init_rescale_policy(), and btw we probably shouldn't use it internally at all since it compiles only for a specific dimension. AFAIU rescale policy should be dimension-agnostic and this is a bug, do you agree?
If the answer is yes...
Should we fix it in 1.57?
Should it use all coordinates for rescaling so be dimension-agnostic or should it be only higher-dimensions-compatible, i.e. rescale using only first 2 coordinates and ignore other?

Regards,
Adam

t:\boost\boost\geometry\algorithms\assign.hpp(155): error C2780: 'void boost::geometry::dispatch::assign<boost::geometry::point_tag,Geometry,3>::apply(Point &,const T &,const T &,const T &)' : expects 4 arguments - 3 provided 1> with 1> [ 1> Geometry=robust_point_type 1> , Point=robust_point_type 1> ] 1> t:\boost\boost\geometry\algorithms\detail\assign_values.hpp(277) : see declaration of 'boost::geometry::dispatch::assign<boost::geometry::point_tag,Geometry,3>::apply' 1> with 1> [ 1> Geometry=robust_point_type 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(70) : see reference to function template instantiation 'void boost::geometry::assign_values<RobustPoint,boost::long_long_type>(Geometry &,const Type &,const Type &)' being compiled 1> with 1> [ 1> RobustPoint=robust_point_type 1> , Geometry=robust_point_type 1> , Type=boost::long_long_type 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(154) : see reference to function template instantiation 'void boost::geometry::detail::get_rescale_policy::init_rescale_policy<point_type,robust_point_type,Geometry,factor_type>(const Geometry &,Point &,RobustPoint &,Factor &)' being compiled 1> with 1> [ 1> Geometry=QCS::Polygon3D 1> , Point=point_type 1> , RobustPoint=robust_point_type 1> , Factor=factor_type 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(277) : see reference to function template instantiation 'Policy boost::geometry::detail::get_rescale_policy::get_rescale_policy::apply(const Geometry &)' being compiled 1> with 1> [ 1> Policy=rescale_policy_type 1> , Geometry=QCS::Polygon3D 1> ] 1> t:\boost\boost\geometry\policies\robustness\get_rescale_policy.hpp(277) : see reference to function template instantiation 'Policy boost::geometry::detail::get_rescale_policy::get_rescale_policy::apply(const Geometry &)' being compiled 1> with 1> [ 1> Policy=rescale_policy_type 1> , Geometry=QCS::Polygon3D 1> ] 1> t:\boost\boost\geometry\algorithms\intersects.hpp(67) : see reference to function template instantiation 'Policy boost::geometry::get_rescale_policy<rescale_policy_type,Geometry>(const Geometry &)' being compiled 1> with 1> [ 1> Policy=rescale_policy_type 1> , Geometry=QCS::Polygon3D 1> ] 1> q:\lpcore\lassymbols\lppolygon.cpp(1066) : see reference to function template instantiation 'bool boost::geometry::intersects<QCS::Polygon3D<Type>>(const Geometry &)' being compiled 1> with 1> [ 1> Type=double 1> , Geometry=QCS::Polygon3D 1> ] Thanks, Sures


_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|

Re: Compilation error with version 1.56

jakka30
Thank you for your quick reply. Fixed this converting my 3D polygon to 2D polygon before calling intersect method.
Thanks,
Suresh