
9 Oct
2009
9 Oct
'09
10:12 a.m.
Jeremiah Willcock wrote:
That only works if both graphs are adjacency_lists and you have control over the graph types. I would personally just make:
template <typename T> struct from_first_graph {T data;}; template <typename T> struct from_second_graph {T data;};
and then have my variants be:
boost::variant<from_first_graph<graph_traits<First>::vertex_descriptor>, from_second_graph<graph_traits<Second>::vertex_descriptor>
and the same for edge descriptors. This will disambiguate the types for arbitrary graphs.
It seems a very good idea to me. I'm trying it. I'll tell you about it ASAP. Thanks again, Cosimo Calabrese.