
#include "boost/graph/graphviz.hpp"

struct myVertex_t {
	int color;
};

typedef boost::adjacency_list<
	boost::vecS,                   // edge container
	boost::vecS,                   // vertex container
	boost::undirectedS,            // type of graph
	myVertex_t,                    // vertex properties
	boost::property<               // edge properties
		boost::edge_color_t,             // ???
		boost::default_color_type        // enum, holds 5 colors
		>
	> myGraph_t;

int main()
{
	myGraph_t g;
	boost::add_edge(0, 1, g);

	myGraph_t::vertex_iterator it = vertices(g).first;
	//auto it = vertices(g).first;
	g[*it++].color = 42;
	g[*it++].color = 43;

	boost::dynamic_properties dp;
	dp.property("color",   boost::get( &myVertex_t::color,  g ) );
	dp.property("node_id", boost::get( boost::vertex_index, g ) );
	boost::write_graphviz_dp( std::cout , g, dp);
}
