title: How do I define a custom distance in Boost Dijkstra?
body: <p>I'm currently looking at the documentation of Boost Dijkstra - <a href="http://www.boost.org/doc/libs/1_52_0/libs/graph/doc/dijkstra_shortest_paths.html" rel="nofollow">http://www.boost.org/doc/libs/1_52_0/libs/graph/doc/dijkstra_shortest_paths.html</a>; my objective is to modify the distance combining to get a "max" instead of a "plus" when computing my distances. The doc says this:</p>
  
  <pre><code>IN: distance_combine(CombineFunction cmb)
  This function is used to combine distances to compute the distance of a path. The
  CombineFunction type must be a model of Binary Function. The first argument typ
  of the binary function must match the value type of the DistanceMap property map
  and the second argument type must match the value type of the WeightMap property
  map. The result type must be the same type as the distance value type.
  Default: closed_plus&lt;D&gt; with D=typename property_traits&lt;DistanceMap&gt;::value_type
  </code></pre>
  
  <p>What's the syntax to define such a Combine function? I've tried fumbling around with std::max, but my compiler doesn't seem to be happy with it. </p>