
I'm sorry for spamming requests for help every day... I'm really stuck here and any help would be very welcome :) Please let me know if I need to clarify my question better. Thanks! On Wed, Nov 2, 2011 at 6:51 PM, Lorenzo Caminiti <lorcaminiti@gmail.com> wrote:
On Wed, Nov 2, 2011 at 4:40 PM, Lorenzo Caminiti <lorcaminiti@gmail.com> wrote:
On Mon, Oct 24, 2011 at 2:16 PM, Dave Abrahams <dave@boostpro.com> wrote:
on Mon Oct 24 2011, lcaminiti <lorcaminiti-AT-gmail.com> wrote:
Hello all,
The following parameter type requirement:
(required (graph, *) ) (optional (root_vertex, (typename boost::graph_traits<graph_type>::vertex_descriptor), *boost::vertices(graph).first) )
Generates a GCC error:
dfs.05.cpp:40: error: ‘graph_type’ was not declared in this scope
Yeah.... I'm guessing this is what graphs::graph::_ is all about, but according to revision control, Daniel made this happen, and there's basically no documentation for it. Daniel?
Help anyone??
I'm just trying to compile the graph example from the Boost.Parameter docs, in an ideal world (doc examples added to regression tests) it'd be easier... please help :)
Here's the deal. If I use tag::graph::_ instead of graph_type, that type is define by the expansion of BOOST_PARAMETER_NAME(graph) as:
namespace tag { struct graph { static char const* keyword_name() { return "graph"; } typedef boost::parameter::value_type< boost::mpl::_2, graph, boost::parameter::void_ > _; typedef boost::parameter::value_type< boost::mpl::_2, graph, boost::parameter::void_ > _1; }; } namespace { ::boost::parameter::keyword<tag::graph> const& _graph = ::boost::parameter::keyword<tag::graph>::instance; }
Then if I use this type in the declaration of the root_vertex parameter type:
(optional (root_vertex, (typename boost::graph_traits<tag::graph::_>::vertex_descriptor), *boost::vertices(graph).first) ) )
I get the error:
/usr/include/boost/parameter/value_type.hpp: In instantiation of ‘boost::parameter::value_type<mpl_::arg<2>, graphs::tag::graph, boost::parameter::void_>’: /usr/include/boost/graph/graph_traits.hpp:29:52: instantiated from ‘boost::graph_traits<boost::parameter::value_type<mpl_::arg<2>, graphs::tag::graph, boost::parameter::void_> >’ dfs.06.cpp:85:1: instantiated from here /usr/include/boost/parameter/value_type.hpp:60:13: error: no type named ‘binding’ in ‘struct mpl_::arg<2>’ /usr/include/boost/parameter/value_type.hpp:62:5: error: no type named ‘binding’ in ‘struct mpl_::arg<2>’
I am not sure but it seems that the mpl::_2 in graph::_ declaration is not bound to anything while it should be bound to Boost.Parameter argument pack... how is this supposed to work? Who should bind mpl::_2 to the argument pack?
Thanks a lot. --Lorenzo
--Lorenzo