title: Accessing BGL GraphProperty
body: <p>I am trying to access the graph label for a <em>dot(graphviz)</em> formatted input file using the Boost Graph Library. Below is the typedef for the graph type:</p>
  
  <pre><code>struct DotVertex {
    std::string label;
  };
  
  struct DotEdge {
    std::string label;
  };
  
  struct DotGraph {
    std::string label;
  };
  
  typedef boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::directedS,
                                DotVertex, DotEdge, DotGraph&gt; graph_t;
  </code></pre>
  
  <p>And this is how I assign the dynamic properties:</p>
  
  <pre><code>  graph_t graphviz;
  
    boost::dynamic_properties dp(boost::ignore_other_properties);
  
    dp.property("label",       boost::get(&amp;DotGraph::label,          graphviz));
    dp.property("label",       boost::get(&amp;DotVertex::label,         graphviz));
    dp.property("label",       boost::get(&amp;DotEdge::label,           graphviz));
    std::ifstream ifs("sample.dot");
    bool status = boost::read_graphviz(ifs, graphviz, dp);
  </code></pre>
  
  <p>The compiler complains about the assignment for the <em>DotGraph::label</em> with the error message:</p>
  
  <pre><code>read_graph.cc:25:30: error: no matching function for call to 'get'   dp.property("label",       boost::get(&amp;DotGraph::label,          graphviz));
  </code></pre>
  
  <p>Can someone point out what is the convenient way to read the graph label in this case? Thanks!</p>