Skip to content
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

Header shortest_paths.hpp adds dependency on fmt/format.h #90

Open
akrzemi1 opened this issue Jan 21, 2024 · 3 comments
Open

Header shortest_paths.hpp adds dependency on fmt/format.h #90

akrzemi1 opened this issue Jan 21, 2024 · 3 comments

Comments

@akrzemi1
Copy link
Contributor

This library should not depend on fmt/format.h, especially that on MSVC there is no reason to include it when we have <format>.

@pratzl
Copy link
Collaborator

pratzl commented Sep 13, 2024

I chose to use a recent version of fmt to provide the latest capabilities in the library, as they continue to improve it, without requiring us to bump graph-v2 to use C++23. print() and println() are obvious things, but there are other features I can't recall off the top of my head.
Is this causing you any problems?

@akrzemi1
Copy link
Contributor Author

In my environment, I do not have the {fmt} library. That this should perevent me from doing the Shortest Paths algorithm is strange.

I tried to see if this is still the case, but I can see that the file shortest_paths.hpp is gone. I tried graph/algorithm/common_shortest_paths.hpp, but only through including it, I get error C2760 at line:
https://github.com/stdgraph/graph-v2/blob/master/include/graph/algorithm/common_shortest_paths.hpp#L18

This is about the undefined identifier is_arithmetic_v, and a bunch of other identifiers in this file (like edge_reference_t). It looks like they require the namespace prefix.

@pratzl
Copy link
Collaborator

pratzl commented Sep 14, 2024

CMake should be downloading the {fmt} library if you "Delete Cache and Reconfigure".
There's now dijkstra_shortest_paths.hpp and bellman_ford_shortest_paths. This is similar to how Boost Graph does these algorithms.
In the move from std::graph to the graph namespace, I added the using statements in graph_using.hpp to make things look cleaner. I don't know if this is the best idea, but I find it improves readability for myself. I've added an #include for that in common_shortest_paths.hpp so people won't get that error. It will be in the next push, hopefully this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants