id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5659,The closed_plus structure should accept a custom infinity value.,Thomas Sewell ,Jeremiah Willcock,"I'm trying to run dijkstra_shortest_paths with a custom distance type (my graph supports two metrics, I want to find the length in metric A of the shortest paths according to metric B). I've been struggling to understand why I was getting dependencies on MyDistType(int). It turns out that overloading + on MyDistType is only half the story. The default combine operator for distances comes from closed_plus, which assumes an infinity value can be constructed by std::numeric_limits::max(). This function seems to degrade to trying the constructor T(n) for some int n (probably INT_MAX) if it isn't a known numeric type, leading to bizarre errors (buried under piles of template goop). This patch gives instances of closed_plus a parameter to store the custom infinity value, defaulting to the one from std::numeric_limits. It also passes the correct default value in dijkstra_shortest_paths. I haven't checked whether any of the other algorithms that use closed_plus can potentially have non-standard infinity values. Hope you agree this is an improvement. Yours, Thomas.",Bugs,closed,To Be Determined,graph,Boost 1.46.1,Problem,fixed,,