
14 Oct
2006
14 Oct
'06
2:43 a.m.
Imagine a template defined like this: template< class T, class U = void > struct foo {}; I would like to turn this into a metafunction class F such that: mpl::apply< F, int >::type ==> foo<int, void> and mpl::apply< F, int, float >::type ==> foo<int, float> Can this be done? If F is foo< _1, _2 >, then the first apply above won't compile because it hasn't been given enough arguments. -- Eric Niebler Boost Consulting www.boost-consulting.com