Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-04-18 10:49:02


From: "David Abrahams" <david.abrahams_at_[hidden]>
> Let's just assume we're working only with dot-typelist-like structures
> for the time being. It's fairly easy to abstract out the head, tail,
> etc.
>
> template <class T> struct head;
> template <class T,class U> struct head<tuple_node<T,U> > {
> typedef T type;
> };

Or you could rename 'head' as 'front' and 'tail' as 'rest', making the list
a container. Or you could use 'dereference' and 'next', making it an
iterator. Or both. Wonders of modern technology.


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