Boost logo

Boost :

From: Juan Antonio Gálvez Gamboa (jag_laboral_at_[hidden])
Date: 2005-06-08 18:30:34


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk