Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2006-10-13 22:43:17

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>


   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

Boost list run by bdawes at, gregod at, cpdaniel at, john at