|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-11-20 12:39:27
On Tuesday 20 November 2001 10:49 am, you wrote:
> > For instance I don't like those macros to
> > define typelists.
>
> I am looking forward to hear about better solutions. For the record, I made
> a very offensive comment about the preprocessor already :o).
TYPELIST_5(T1, T2, T3, T4, T5)
becomes
make_type_list<T1, T2, T3, T4, T5>::type
make_type_list is defined as:
template<
typename T1 = null_type,
typename T2 = null_type,
...
typename T50 = null_type
>
struct make_type_list {
// build a typelist from T1..T50, eliminating extra null_types from the
// list. Call the final typelist "type"
};
Boost.Tuples does this.
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk