|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-26 12:46:23
Given what I've seen of the template instantiation speed of compilers
(http://users.rcn.com/abrahams/instantiation_speed/index.html) it might make
more sense if a type_list and a tuple were the same thing.
BTW, isn't "identity" a much better name than "type2type"?
-Dave
----- Original Message -----
From: "Hamish Mackenzie" <boost_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, November 26, 2001 12:29 PM
Subject: Re: [boost] Submission: typelist
> On Mon, 2001-11-26 at 15:35, David Abrahams wrote:
> > Yes: one might want to use one's tuple metaprogramming libraries on a
tuple
> > type supplied by some 3rd-party library. The MPL provides a traits-based
> > mechanism which allows any number of different type lists to be used
with
> > its algorithms. A similar approach could be taken for tuples.
>
> Would we still be able to do this if type_list had a kind of default
> tuple behavour if instantiated?
>
> The advantage of doing so is that we could write
>
> class foo
> {
> public:
> type_list< int, float > x;
> };
>
> instead of
>
> class foo
> {
> public:
> tuple< type_list< int, float > > x;
> };
>
> Now I think about it I am not convinced that the shorter syntax is
> better as it is biassed towards tuples and typelists are userful for
> many other things too. However it is sort of nice that instantiating a
> type list instantiates the types of the list. Kind of makes sense that
> it should.
>
> Hamish
>
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk