|
Boost Users : |
From: laurent de Vito (l_de_vito_at_[hidden])
Date: 2005-01-26 06:00:14
Hello,
I cannot compile the boost/graph library 1.32.0 on a SUN machine using Sun
C++ 5.5.
I get the following error message :
boost_1_32_0/boost/graph/depth_first_search.hpp", line 377: Error: Default
arguments cannot be added in later declarations of the template function in
the same scope.
which does make sense since the compiler cannot decide which routine
depth_first_visit to use
if the second routine (line 371) has an extra template but the the extra
template has a default value.
So in boost/graph/depth_first_search.hpp, I simply deleted the default
argument :
template <class IncidenceGraph, class DFSVisitor, class ColorMap,
class TerminatorFunc>
void depth_first_visit
(const IncidenceGraph& g,
typename graph_traits<IncidenceGraph>::vertex_descriptor u,
DFSVisitor vis, ColorMap color, TerminatorFunc func = TerminatorFunc())
becomes
template <class IncidenceGraph, class DFSVisitor, class ColorMap,
class TerminatorFunc>
void depth_first_visit
(const IncidenceGraph& g,
typename graph_traits<IncidenceGraph>::vertex_descriptor u,
DFSVisitor vis, ColorMap color, TerminatorFunc func)
Unfortunately the compilation was afterwards not successful;
this time I got
"boost_1_32_0/boost/graph/named_function_params.hpp", line 500: Error:
Cannot return const
boost::bgl_named_params<boost::detail::components_recorder<int*>,
boost::graph_visitor_t, boost::no_property> from a function that should
return boost::detail::error_property_not_found.
"boost_1_32_0/boost/graph/depth_first_search.hpp", line 354: Where:
While instantiating "boost::get_param<boost::graph_visitor_t,
boost::root_vertex_t, boost::detail::components_recorder<int*>,
boost::no_property>(const
boost::bgl_named_params<boost::detail::components_recorder<int*>,
boost::graph_visitor_t, boost::no_property>&, boost::root_vertex_t)".
"boost_1_32_0/boost/graph/depth_first_search.hpp", line 354: Where:
Instantiated from non-template code.
"boost_1_32_0/boost/graph/depth_first_search.hpp", line 355: Error: Could
not find a match for boost::vertices<boost::T>(const
boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS,
boost::no_property, boost::no_property, boost::no_property, boost::listS>).
big thanks for any help,
Laurent
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net