#include #include #include #include using namespace std; typedef boost::adjacency_list<> graph_t; int main(int,char**) { string empty_string; boost::ref_property_map< graph_t::vertex_descriptor, string > pmap(empty_string); graph_t g; add_vertex(g); boost::dynamic_properties props; props.property("foo",pmap); boost::write_graphml(cout,g,props); }