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

[boost] Apply patch to fix https://github.com/boostorg/graph/issues/268 #6132

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions recipes/boost/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ patches:
base_path: "source_subfolder"
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
base_path: "source_subfolder"
- patch_file: "patches/graph_issue_268.patch"
base_path: "source_subfolder"
- patch_file: "patches/boost_mpi_check.patch"
base_path: "source_subfolder"
1.75.0:
Expand All @@ -136,10 +138,14 @@ patches:
base_path: "source_subfolder"
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
base_path: "source_subfolder"
- patch_file: "patches/graph_issue_268.patch"
base_path: "source_subfolder"
- patch_file: "patches/boost_mpi_check.patch"
base_path: "source_subfolder"
1.76.0:
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
base_path: "source_subfolder"
- patch_file: "patches/graph_issue_268.patch"
base_path: "source_subfolder"
- patch_file: "patches/boost_mpi_check.patch"
base_path: "source_subfolder"
26 changes: 26 additions & 0 deletions recipes/boost/all/patches/graph_issue_268.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/boost/graph/detail/adjacency_list.hpp b/boost/graph/detail/adjacency_list.hpp
index 4b11fa51..8ba6b12e 100644
--- a/boost/graph/detail/adjacency_list.hpp
+++ b/boost/graph/detail/adjacency_list.hpp
@@ -2068,15 +2068,20 @@ namespace detail
inline void reindex_edge_list(
EdgeList& el, vertex_descriptor u, boost::disallow_parallel_edge_tag)
{
- for (typename EdgeList::iterator ei = el.begin(); ei != el.end(); ++ei)
+ typename EdgeList::iterator ei = el.begin(), e_end = el.end();
+ while (ei != e_end)
{
if (ei->get_target() > u)
{
typename EdgeList::value_type ce = *ei;
+ ++ei;
el.erase(ce);
--ce.get_target();
el.insert(ce);
}
+ else {
+ ++ei;
+ }
}
}
} // namespace detail