
Greetings to everyone. It seems there´s a bug when using the astar_search.hpp in the dummie property map section. namespace detail { template <class VertexListGraph, class AStarHeuristic, class CostMap, class DistanceMap, class WeightMap, class IndexMap, class ColorMap, class Params> inline void astar_dispatch2 (VertexListGraph& g, typename graph_traits<VertexListGraph>::vertex_descriptor s, AStarHeuristic h, CostMap cost, DistanceMap distance, WeightMap weight, IndexMap index_map, ColorMap color, const Params& params) { dummy_property_map p_map; typedef typename property_traits<CostMap>::value_type C; astar_search (g, s, h, choose_param(get_param(params, graph_visitor), make_astar_visitor(null_visitor())), choose_param(get_param(params, vertex_predecessor), p_map), cost, distance, weight, index_map, color, choose_param(get_param(params, distance_compare_t()), std::less<C>()), choose_param(get_param(params, distance_combine_t()), closed_plus<C>()), choose_param(get_param(params, distance_inf_t()), std::numeric_limits<C>::max()), choose_param(get_param(params, distance_zero_t()), C())); } I´m using Visual C++ .NET 2003 and it seems it´s getting a confusion between: std::numeric_limits<C>::max()) and a macro called max, defined somewhere, whose body would be: #define max(((a)>(b))?(a):(b)) I got the definition of this macro pointing with the mouse cursor over the "max" word on std::numeric_limits<C>::max()) .Before trying to use the astar_search() function, in the copilements always a warning telling "not enough parameters for the macro max" has appeared (that´s logic if it´s interpreted as a macro -where are paseed the two parameters?-) but the questions is... it´s necessary to be interpreted as the "max" numeric_limit. I´m not sure if this is an atar_search bug but, in case it´s not and ,so that, I have a "max" macro defined, any suggestions where should I fin it for modifying it´s name to MAX or directly deleted from the header file?. Thanks for your time... ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es

On Jun 8, 2005, at 6:30 PM, Juan Antonio Gálvez Gamboa wrote:
Greetings to everyone. It seems there´s a bug when using the astar_search.hpp in the dummie property map section. [snip] I´m using Visual C++ .NET 2003 and it seems it´s getting a confusion between:
std::numeric_limits<C>::max())
and a macro called max, defined somewhere, whose body would be:
#define max(((a)>(b))?(a):(b)) [snip] I´m not sure if this is an atar_search bug but, in case it´s not and ,so that, I have a "max" macro defined, any suggestions where should I fin it for modifying it´s name to MAX or directly deleted from the header file?.
We try to work around this problem within the BGL. The fix is to put BOOST_PREVENT_MACRO_SUBSTITUTION between the "max" and the "()" in aster_search.hpp. I've fixed the problem in Boost CVS. Thanks for the bug report! Doug
participants (2)
-
Douglas Gregor
-
Juan Antonio Gálvez Gamboa