
On 7/11/2010 9:57 AM, Tim Blechmann wrote:
hi all,
i am currently having a hard time to figure out, how to use boost.parameter with default template arguments.
i have a signature:
typedef parameter::parameters<optional<tag::a>, optional<tag::b> > foo_signature;
template<class X, class A = boost::parameter::void_, class B = boost::parameter::void_> class foo {};
now, how do i set a default parameter for one of the template arguments? it is either not documented, or i am missing the point, where it is explained ...
thanks, tim
Try using boost::parameter::binding ...? typedef typename boost::parameter::parameters< ...
::bind< A, B >::type bound_params_type; typedef typename boost::parameter::binding< bound_params_type, [tag], [default] >::type ... ;
I'm only copying this from code I wrote using the Boost.Parameter library some time ago, so not sure if this is the recommended way... - Jeff