Geoff Hilton escribió:
Note: graph variable is of type const Graph&.
[skip]
Also, my Weight type has an explicit constructor which takes a POD convertible to 0, a requirement imposed it seems by line 155 of bellman_ford_shortest_paths.hpp. Why doesn't the algorithm take a weight of value zero as a parameter and use it instead?
Anyway, because of this explicit constructor I've added a (typical) assignment operator (not sure if this is relevant, but I'm mentioning it just in case).
I should also note that out of curiosity I commented out line 103 of bellman_ford_shortest_paths.hpp which is:
function_requires
>(); Commenting out the above line allows my code as written above to compile, otherwise it fails with the error written in my original response (quoted above). Whether the compiled code (with line 103 commented out) functions as expected I don't know, I haven't tested it.
Thanks, Geoff
It looks like the problem is with
template