<p>&nbsp;
<pre>
  template &lt;class Graph&gt; struct exercise_vertex {
    //...
    void operator()(const Vertex&amp; v) const
    {
      //...
      std::cout &lt;&lt; &quot;in-edges: &quot;;
      typedef typename graph_traits&lt;Graph&gt; GraphTraits;
      typename GraphTraits::in_edge_iterator in_i, in_end;
      for (boost::tie(in_i, in_end) = in_edges(v,g); 
           in_i != in_end; ++in_i) {
        e = *in_i;
        Vertex src = source(e, g), targ = target(e, g);
        std::cout &lt;&lt; &q