Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-12-17 08:08:45


struct nil;
struct missing;
template<class, class> struct pair;

template<class A1 = missing, class A2 = missing, class A3 = missing, class
A4 = missing> struct list
{
  typedef typename list<A2, A3, A4, missing>::type rest;
  typedef pair<A1, rest> type;
};

template<> struct list<missing, missing, missing, missing>
{
  typedef nil type;
};

The number of arguments can be increased arbitrarily, although IMO both 50
and 128 are overkill.

I believe that this implementation compares well with the existing solutions
offered by Loki and MPL.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk