[Graph] Help on custom VertexList

Hi everybody,
I want to use my custom container as a vertex list in a graph. I have
followed the documentation, but I don't know exactly how I should
overload the push() and erase() functions.
The following example code, using boost::array, gives an error: "no
matching function for call to 'container_category(boost::array

Hi Nicola, On Sep 18, 2005, at 9:15 AM, Nicola Vitacolonna wrote:
Hi everybody, I want to use my custom container as a vertex list in a graph. I have followed the documentation, but I don't know exactly how I should overload the push() and erase() functions.
Sorry, looks like the documentation is incomplete in that regard. I'll fix that. You can find examples of push() and erase() in: boost/pending/container_traits.hpp
The following example code, using boost::array, gives an error: "no matching function for call to 'container_category(boost::array
&)". Can someone help me?
You'll need to define a container_category function for boost::array. There are examples of this also in container_traits.hpp.
One more question: is it possible to get a reference to the vertex container, given an adjacency_list<...> object?
You're not suppose to, but if you must, the data member name is m_vertices. There is no guarantee that that name will stay the same, as that is not a publicly documented name. Cheers, Jeremy
participants (2)
-
Jeremy Siek
-
Nicola Vitacolonna