Reinstantiate 'Distance' type for template expansion. - #575
Conversation
|
Boost dependency footprint vs Header-inclusion weights (graph files pulling each direct dependency in): No header-inclusion-weight changes. Transitive Boost modules: 66 → 66 (0) |
|
Compiler-warning counts vs
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
'g++ -Wall -Wextra' spotted the unused parameter 'g'.
|
Thank you @ascherer ! Looks like an old commit in 2016 (f4d50aa) was trying to modernize examples with I am still not sure what to do with the Just for context so we do a better job with those examples! 😄 |
|
In 1994 I bought Knuth's book "The Stanford GraphBase" and earned my first "bug check" for porting the SGB software to the Commodore Amiga. In the early 2000s I met Jeremy Siek at the Net.ObjectDays conference in Erfurt and we talked in depth about the SGB interface of the Boost Graph Library. This resulted in the improved And from time to time (every decade or so), while still working on my Recently I managed to upgrade my SGB codebase to genuinely compile with C++23 compilers, so today I checked that the SGB header files included in |
|
I must have met Jeremy at the very first Net.ObjectDays conference in Oktober 2000, where he gave a talk at the C++ template workshop, because of his commit in November 2000: fac92e1 |
Becheler
left a comment
There was a problem hiding this comment.
Just a small feedback, not mandatory though 👍🏽
| // Use the "w" property for parent | ||
| auto p = get(w_property< Vertex* >(), g); | ||
| total_length_visitor< Distance > length_vis(sp_length, d); | ||
| total_length_visitor< |
There was a problem hiding this comment.
If necessary I do prefer using an explicit type alias to limit complexity of signatures.
using Distance = typename property_map< Graph*, z_property< long > >::type;
total_length_visitor< Distance > length_vis(sp_length, d);|
That's amazing context thank you ! 😄 |
This reverts commit 42983e1.
In older versions of boost::graph there was a dedicated page for the sgb/bgl interface: https://www.boost.org/doc/libs/1_34_0/libs/graph/doc/stanford_graph.html Later versions don't seem to have this. In section Installing the SGB I would suggest to point to https://github.com/ascherer/sgb/releases/tag/2025-12-28 and the "local" branch with the latest modifications of the Stanford GraphBase. |
|
The CI failing in unrelated to you changes (well, examples are not even in CI, I should fix that at some point). I will merge it, and I will open a documentation PR to reinstate the previous state 😄 |
Before submitting
developbranch.Type of change
Does this PR introduce a breaking change?
What this PR does
It fixes the example program
miles_span.cppfor compilation.Motivation
Recently I upgraded the
PROTOTYPESchangefiles for The Stanford GraphBase (see https://github.com/ascherer/sgb/releases/tag/2025-12-28; with the grace of Donald Knuth, see https://www-cs-faculty.stanford.edu/~knuth/sgb.html) and now I tried to compile the four SGB example codesgirth.cpp,miles_span.cpp,roget_components.cpp, andtopo-sort-with-sgb.cppwith g++ 13.3.0 on Kubuntu 24.04LTS.Testing
Checklist
b2in thetest/directory).