|
Boost : |
From: James S. Adelman (j.adelman_at_[hidden])
Date: 2001-11-28 12:32:19
On Wednesday 28 November 2001 12:25 pm, you wrote:
> ----- Original Message -----
> From: "James S. Adelman" <j.adelman_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Tuesday, November 27, 2001 12:39 PM
> Subject: Re: [boost] Submission: typelist
>
> > On Tuesday 27 November 2001 4:52 pm, you wrote:
> > > From: "Peter Dimov" <pdimov_at_[hidden]>
> > >
> > > > Finally, I like the int2type<> and type2type<> names. They are
> > >
> > > sufficiently
> > >
> > > > obvious to me. I don't see a need to change them into *_identity.
> > >
> > > You know, after all the tossing around, I would love to return to them,
> > > too. Besides, they are known because of Mc++D and articles.
> > >
> > >
> > > Andrei
> >
> > Yes: they are aliases, not identities; we have strong typing, after all.
>
> They're only aliases if you look at them as types. I'm looking at them as
> metafunctions. They are identity metafunctions which return the same
> type/value which has been passed to them.
>
> -Dave
Nonetheless, two symbols are equal only if one can be used in place of
another. This is clearly not the case for int2type, since it maps an int to
a type, and it is not the case for type2type, since the types are distinct.
The mappings which are performed as essentially casts: int2type and type2type
convert an int or a type into a(nother) type which can be used for static
despatch -- the original int or type is a first class object, but the outcome
is merely a label for the original.
James.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk