
On Tue, 20 Jul 2010, Alex Betts wrote:
Hello!
I can't seem to use a custom container for storing edge data when using adjacency_list (this is with gcc 4.1.0 on Linux, but it won't work for gcc 4.3.0 either). I understand that I need to create push() and erase() functions for the custom container, but the compiler never seems to see my implementations of these two functions, as it always gives an error like:
boost/pending/container_traits.hpp:414: error: no matching function for call to ‘container_category(...)’
...from the default implementation of push() defined in container_traits.hpp. I've tried moving push() and erase() in and out of the boost::graph_detail namespace, but that doesn't seem to help. I've attached the source for the program in question, & appreciate any help!
You need to have a container_category() function like the error message says; that should be in the same namespace as your container type. You will probably also need the other functions (like iterator_stability()) that are in container_traits.hpp for standard containers. I'm not sure exactly what the requirements are; I assume you saw <URL:http://www.boost.org/doc/libs/1_43_0/libs/graph/doc/using_adjacency_list.html> since you mentioned push() and erase() functions. It looks like that isn't quite enough as you've seen, but I'm not sure there is a complete list anywhere. Your best hope is probably <boost/pending/container_traits.hpp> and which functions are defined there for the standard containers. -- Jeremiah Willcock