diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index dceec768a0d6a..089dfc2583d64 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -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: @@ -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" diff --git a/recipes/boost/all/patches/graph_issue_268.patch b/recipes/boost/all/patches/graph_issue_268.patch new file mode 100644 index 0000000000000..7a2bfb676e24a --- /dev/null +++ b/recipes/boost/all/patches/graph_issue_268.patch @@ -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