;class G&gt;
  struct AdjacencyGraphConcept
  {
    typedef typename boost::graph_traits&lt;G&gt;::adjacency_iterator
      adjacency_iterator;
    void constraints() {
      BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; ));

      p = adjacent_vertices(v, g);
      v = *p.first;
      const_constraints(g);
    }
    void const_constraints(const G&amp; g) {
      p = adjacent_vertices(v, g);
    }
    std::pair&lt;adjacency_iterator,adjacency_iterator&gt; p;
    typename boo