
François Duranleau wrote:
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::_ >)) ) //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ )
?
No, not in general. If you are repeating something like that, you could factor it out to a metafunction class: template <class Tag> struct same_as { template <class T, class Args> struct apply : boost::is_same< T , typename boost::parameter::value_type< Args, Tag, void >::type > {}; }; BOOST_PARAMETER_FUNCTION( (some_return_type) the_function , kw , (required (arg1 , *) (arg2 , *(same_as<kw::arg1>)) ) ) HTH, -- Daniel Wallin Boost Consulting www.boost-consulting.com