boost graph library directed multigraph edge_range bug

后端 未结 1 684
傲寒
傲寒 2021-01-19 07:01

I have a directed multigraph with vertices A..C and edges E1..E4

A ---E1--> B
A ---E2--> B
A ---E3--> B
B ---E4--> C

I wanted t

1条回答
  •  粉色の甜心
    2021-01-19 08:01

    This bug has been reported before on the Boost mailinglist.

    it fails to compile when the Directed Selector template argument to adjacency_list is set to directedS, but does work if the argument is either undirectedS, or bidirectionalS. Attached below is a short program illustrating the problem. The problem is that edge_range() instantiates a StoredEdge via a constructor taking 3 arguments, but when the Directed Selector is directedS StoredEdge is typedef'ed to stored_edge_property, which has no such constructor. One solution might be to create overloaded edge_range_dispatch() functions, and dispatch on
    Config::on_edge_storage.

    Changing directedS to undirectedS in your program works. Live Example. But that might not be what you need for your application, so the simple filter you mentioned before might be better. You could repost this on the Boost mailinglist to get more attention for it.

    0 讨论(0)
提交回复
热议问题