Boost logo

Boost Users :

From: François Duranleau (duranlef_at_[hidden])
Date: 2007-10-03 21:03:16


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<Args, kw::arg1>::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

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