Skip to content

No add_edge in labeled_graph #147

Closed
Closed

Description

@jzmaddock

while trying to build the example labeled_graph.cpp I see:

1>d:\data\boost\boost\libs\graph\example\labeled_graph.cpp(61): error C2039: 'add_edge': is not a member of 'boost::labeled_graph<G,size_t,boost::defaultS>'
1>d:\data\boost\boost\libs\graph\example\labeled_graph.cpp(57): note: see declaration of 'boost::labeled_graph<G,size_t,boost::defaultS>'

Activity

  1. deinst commented on Jan 26, 2019

    @deinst
    Contributor

    Ok, this is trivial to fix, just change the member add_edge to the global add_edge. Unfortunately, that leaves us with a particularly useless fragment of code that compiles.

    Right now the interface to labeled_graph is undocumented. If we make a sane example, we should document the class we are demonstrating. Do we want to document it?

  2. jzmaddock commented on Jan 26, 2019

    @jzmaddock
    ContributorAuthor

    Right now the interface to labeled_graph is undocumented. If we make a sane example, we should document the class we are demonstrating. Do we want to document it?

    Oh :(

    Down and down the rabbit hole we go!

    Looks like this was something that was never finished, a quick google suggests that folks have found it and are actually using it though, also that it has some serious issues: https://stackoverflow.com/questions/46012477/boost-labeled-graph-doesnt-delete-vertices

    (Aside: someone should probably triage the issues languishing on the old Trac for this library)...

    So.... I guess if you think you have the time to polish this header off and document it, then more power to you for sure, whether it's the most important thing to fix I'm not sure, looks like something that should be fixed at some point though I guess.

  3. Becheler commented on May 14, 2026

    @Becheler
    Collaborator

    Hi people,

    After looking into it, it looks like a serpent nest: both labeled_graph and named_graph duplicate features, are incomplete and/or broken, and their implementation is problematic in multiple aspects (for example named_graph is a bit of a wart on adjacency_list: it's mixed in as a base class and drags in Boost.MultiIndex unconditionally, which drags mp11 ...

    Fixes don't look trivial, so I provided an umbrella issue aiming at solving all of this at once: #465
    I will close this issue as it's being superseded by the umbrella issue.

    Thanks again guys for this helpful discussion and analysis ❤️

  4. self-assigned this
    on May 15, 2026
  5. added theissue type on May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions