-
Notifications
You must be signed in to change notification settings - Fork 5
Fix compilation failure with Boost 1.90.0 #11
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
Conversation
Co-authored-by: lixun910 <[email protected]>
Co-authored-by: lixun910 <[email protected]>
Co-authored-by: lixun910 <[email protected]>
| #include <boost/geometry.hpp> | ||
| #include <boost/geometry/geometries/point_xy.hpp> | ||
| #include <boost/geometry/geometries/polygon.hpp> | ||
| #include <boost/geometry/geometries/multi_point.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you add new include here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spatial_validation.cpp uses bg::model::multi_point on line 436 but was relying on transitive includes from <boost/geometry.hpp>. In Boost 1.90.0, the main header may not transitively include all geometry types, so I added the explicit include to ensure the code compiles with both old and new Boost versions.
| #include <boost/geometry.hpp> | ||
| #include <boost/geometry/geometries/point_xy.hpp> | ||
| #include <boost/geometry/geometries/polygon.hpp> | ||
| #include <boost/geometry/multi/geometries/multi_point.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why just remove the include? should #include <boost/geometry/geometries/multi_point.hpp> be added here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VoronoiUtils.cpp doesn't actually use any multi_point types in its code, so the include was unnecessary and could be safely removed. The old include path was causing the compilation failure, but since the file doesn't use multi_point, adding the new path would just add an unused header.
Boost 1.90.0 reorganized geometry headers, moving
multi_point.hppfromboost/geometry/multi/geometries/toboost/geometry/geometries/. This broke compilation on Alpine Linux and other platforms using BH 1.90.0.Changes
<boost/geometry/multi/geometries/multi_point.hpp>include (file doesn't use multi_point types)<boost/geometry/geometries/multi_point.hpp>include using new path (file usesbg::model::multi_pointbut relied on transitive includes)Changes are backward compatible—the new header path exists in older Boost versions.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.