title: Color map in boost graph breadth_first_visit
body: <p>I want to use boosts <code>breadth_first_visit</code> method and i'd like to provide it with my own "external" color map.
  I defined the graph as follows</p>
  
  <pre><code>typedef boost::adjacency_list&lt;boost::setS, boost::listS, boost::undirectedS, 
    boost::property&lt;boost::vertex_index_t, int, 
    boost::property&lt;boost::vertex_color_t, boost::default_color_type, 
    Node_t&gt;&gt;&gt;  GraphType;
  </code></pre>
  
  <p>where <code>Node_t</code> is a struct, defining the properties for the vertices. However, i can't find out how i can provide the BFS with my own color map. I'd like to store the vertex colors in a vector, so my definition looks like</p>
  
  <pre><code>std::vector&lt;boost::default_color_type&gt; colors;
  </code></pre>
  
  <p>but i can't figure it out, how to use this for the bfs. </p>
  
  <p>Neither </p>
  
  <pre><code>boost::breadth_first_search(g, *boost::vertices(g).first, 
    boost::color_map(colors));
  </code></pre>
  
  <p>nor </p>
  
  <pre><code>boost::breadth_first_search(g, *boost::vertices(g).first, 
    boost::color_map(&amp;colors[0]));
  </code></pre>
  
  <p>is working. While the first gives me a bunch of different compiler errors (e.g. default-int is not supported, "boost::color_traits" use of class type requires type argument list) the second compile aborts with only C2664 : 'boost::put' cannot convert parameter 2 from 'void*' to 'ptrdiff_t'.</p>
  
  <p>So the question is: How can i use my own color-mapping-structure. An additional question would be: How can i get the color-value for a specific vertex_descriptor?</p>