Boost logo

Boost :

From: Claus Spacil (claus_at_[hidden])
Date: 2000-10-14 14:15:33


Hi all!

I am new to this mailing list, so i am not sure whether someone
already reported this. Couldn't find it searching the boost egroup,
though.

I'm using VC 6.0 SP3.

I was trying to use connected_components on a graph with a listS
container for vertices.

There's an (internal) index vertex property map.

And i used an external property map
(random_access_iterator_property_map) of
default_color_type associated with the index map.

I run into an access vialotion in the [] operator of
random_access_iterator_property_map.

Looking at the call stack i figured out that the following piece of
code
in depth_first_search.hpp lines 73 & 74 (3rd and 4th line of the 2nd
variant of depth_first_search()) leads to the problem:

typedef typename
graph_traits<VertexListGraph>::vertex_descriptor Vertex;

typename property_traits<ColorMap>::value_type c = get(color,
Vertex());

using the functor Vertex() results in a call to get() for a key value of
0.
since my color map uses vertex descriptors of std::list and not
std::vector as key values it's easy to see why this must fail.

To work around the problem, i just let variable c uninitialized, since
it's value seems to be of no meaning to the code anyway. That
solved the problem for me.

Greetings
Claus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk