Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
System: (K)Ubuntu 16.04 LTS
Compiler: g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Try to
g++ -c --std=c++14
the four BGL–SGB examplesgirth.cpp
,miles_span.cpp
,roget_components.cpp
, andtopo-sort-with-sgb.cpp
. This leads to numerous errors.Applied fixes
SGB 2002-01-30 changed the “Associated Press scores” from
ap0
andap1
toap
. This preprocessor macro (sic!) collides with numerous function parameters innamed_function_params.hpp
.#undef
ining the macro doesn't break the BGL–SGB examples.girth.cpp
fails because of a missingnull_vertex()
function. Added to the header templates.roget_components.cpp
invokesstrncmp()
from the C library.#include
added.topo-sort-with-sgb.cpp
hickups because of a missingvertices()
function. Followingroget_components.cpp
and putting the collective SGB header up front fixes this.Results
With my local installation of the Stanford GraphBase, all four example programs compile and link fine with the commandline (from the
example/
subdirectory)The resulting executables produce the expected outputs.