Hi all,
can anyone help me with the compile error I get when compiling the following code? I'm using the MSVC 7.1 compiler (but it is not an internal compiler error).
The error occurs in the last line.
Your help is appreciated!
With kind regards
Maarten
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/connected_components.hpp>
// Identifies the "component number" property
struct component_t
{
enum { num = 4564 };
typedef boost::vertex_property_tag kind;
};
void Test()
{
using namespace boost;
// The "component number" property is an integer for each vertex
typedef boost::property<component_t, int> VertexComponentProperty;
// A graph with list storage and the "component number" property.
typedef boost::adjacency_list < boost::setS, boost::setS, boost::undirectedS, VertexComponentProperty > Graph;
// The property map
typedef boost::property_map<Graph, component_t>::type ComponentPropertyMap;
Graph g;
ComponentPropertyMap vertexToComponent = boost::get(component_t(), g);
// THIS LINE DOES NOT COMPILE. No problem if boost::vecS is used instead of boost::setS in the Graph typedef!
connected_components(g, vertexToComponent);
}