Fix: labeled_graph pointer specialization remove_vertex not removing label#464
Draft
Becheler wants to merge 6 commits intoboostorg:developfrom
Draft
Fix: labeled_graph pointer specialization remove_vertex not removing label#464Becheler wants to merge 6 commits intoboostorg:developfrom
Becheler wants to merge 6 commits intoboostorg:developfrom
Conversation
cebd6b0 to
1f4c413
Compare
a1b6645 to
fda61a0
Compare
…ould invalidate all label-to-vertex mappings after the erased position
fda61a0 to
aeabf1e
Compare
… allowedfor vecS label storage
bd24187 to
5c25561
Compare
…raph and its label from map
5c25561 to
32719a7
Compare
90f0d83 to
912cb87
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #167
labeled_graph.hpp: pointer specializationremove_vertexnow usesgraph_detail::remove_labeled_vertex(_map, *_graph, l). This fixes labeled_graph::remove_vertex does not remove label #167 as label was not removed from_maplabeled_graph.hppboth specializations (graph owning and non-owning):static_assertblockingremove_vertexforvecSlabel storage. Whenremove_vertexcalledvector::erase, it shifts all indices of the labels after the erase point. It was preferred over documentation-only (silent corruption) or runtime error (damage already done before check or pay for a check before everyvector::erasecall) because the combination is fundamentally broken for any non-trailing removal.labeled_graph.cpp: addedtest_remove_vertex_suite+_ptr_variant: 5 scenarios across all selector/graph/ownership comboslabeled_graph.cpp: addedtest_multimap_suite+_ptr: 3 duplicate-label scenarios formultimapS/hash_multimapS, owning + pointertest_graphs.cpp: changeddefaultStomapSforunsignedlabeled graph :defaultSpicks vector, now blocked bystatic_assertbecause it invalidates labelscompile_fail_remove_vertex_vecS.cpp: new file, verifiesstatic_assertrejectsvecSremoval at compile time