Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-01-26 06:49:56

laurent de Vito wrote:

> 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.

I don't think the compiler is right. The second version should be used if
- the extra function parameter is explicitly provided, or
- the function is called with explicitly specified *four* template

In other cases, compiler won't be able to deduce template parameters for the
second function, and will call the first one. I'd suggest to report a bug
to Sun.

> 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.

No idea here. The Sun compiler is not considered very standard-compliant,
and guessing what is wrong here is hard.

Do you pass root vertex to dfs search? If not, then the function must return
error_property_not_found, and it it tries to return something else, the bug
is in the 'Dispatcher' logic.

- Volodya

- Volodya

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at