On Tue, 2 Oct 2007, Daniel Wallin wrote: [...]
Right. This is a doc error. You need extract the type from the argument pack Args:
BOOST_PARAMETER_FUNCTION( (typename boost::parameter::value_type
::type) , the_function , kw , (required (arg1 , *)) ) { return arg1; } Unfortunately the library has a bug that prevents this from working. This has been fixed, but not in time for 1.34. IIRC you need to apply this patch:
http://svn.boost.org/trac/boost/attachment/ticket/1044/parameter.diff
for this to work correctly.
Great! And now, is there a simpler way to do the same thing for other parameters other than doing this: BOOST_PARAMETER_FUNCTION( (some_return_type) the_function , kw , (required (arg1 , *) (arg2 , *(boost::is_same< boost::mpl::_ , kw::arg1::_ >)) ) //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ? -- Francois Duranleau