Modern namespace: boost::graph::
#485
Becheler
started this conversation in
API & Usability
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Story
BGL's types and free functions live directly in
boost::with no scoping. Types likeadjacency_list,compressed_sparse_row,filtered_graph. Free functions likevertices(),edges(),source(),target(),get(),put(). These are generic names that can interact unexpectedly with other libraries. Free functions are particularly tricky because of ADL: a call toget()orvertices()anywhere near a BGL graph can silently resolve to the BGL version.At the same time, every improvement proposal runs into backward compatibility: adding an allocator parameter, cleaning up the property map API, introducing range-based traversal all require touching interfaces that production code depends on today. addy90 needed a different
adjacency_listand could not get one without leaving BGL entirely.One idea raised in the discussion:
Boost.Spirit has done this across multiple generations: Spirit Classic, then
boost::spirit::qi::, thenboost::spirit::x3::all coexisting with the previous one under its own sub-namespace.Dream solution
Starting point
Arnaud's namespace comment in discussion #466
Boost.Filesystem v3 namespace migration
DmitriBogdanov's comment in discussion #466
Intermediary objective (45 min)
Read the starting points and discuss openly. Write down your findings on:
boost::graph::namespace were introduced, what would the migration story look like for existing users?Beta Was this translation helpful? Give feedback.
All reactions