-
Notifications
You must be signed in to change notification settings - Fork 216
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
std::max_element requires forward iterator #175
Comments
Hello, I'm getting back to this repo after a month and a half. While it is possible to make a loop in user code, that might not be the right option. Though it may also be correct since a forward iterator may not make sense in a graph since it isn't convertible in a reliable way to a 1D directional structure. I am working on Travis CI stuff right now and have a backlog, but I'll address this when I can. If you would like a faster resolution and feel comfortable doing so, I will welcome you to create a test case and a code fix in a PR. |
C++20's new overloads of |
I ran into this issue while trying to compile our code using Boost.Graph on macOS with Xcode 11. It looks like Boost.Range did what @morinmorin suggested by replacing For testing our code, I modified
with
I'm still testing this on the other platforms and compilers that we support, though. I can submit a pull request if that helps. |
clang fails to compile boost::betweenness_centrality_clustering complaining that the edge iterators are not forward iterators, as described at boostorg/graph#175. Work around by using boost::first_max_element instead of std::max_element. This should fix compilation on Macs with Homebrew.
I made a pull request (#190). There was another file, |
…ue with forward iterator (boostorg#175)
- Patch bc_clustering.hpp header - boostorg/graph#175 - Can be removed after Boost.Graph is patched
- Patch bc_clustering.hpp header - boostorg/graph#175 - Can be removed after Boost.Graph is patched
- Patch bc_clustering.hpp header - boostorg/graph#175 - Can be removed after Boost.Graph is patched
- Patch bc_clustering.hpp header - boostorg/graph#175 - Can be removed after Boost.Graph is patched
std::max_element contract required forward iterator. Graph library's uses this interface in betweenness_centrality_clustering on edge iterators, which according to boost iterator library are deduced as input iterators. This fails to build with libc++, which validates the category at compile time.
The easiest solution is to handcraft the for loop:
The text was updated successfully, but these errors were encountered: