Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-28 14:52:56

On Wednesday, November 28, 2001, at 12:32 PM, James S. Adelman wrote:
> 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.

wrt int2type, agreed.

You're still not looking at type2type the way I am. Adrei's type2type is
defined thus:

template <typename T>
struct Type2Type
     typedef T OriginalType;

If you regard Type2Type as a metafunction, then T is its parameter and
OriginalType is its return value, in which case it is a true identity

I realize that that isn't the purpose for which these templates are
defined in Andrei's code. They really are wrappers, in general used to
prevent some properties of their parameters from coming into play (e.g.
a reference type or a compile-time constant integer can be wrapped into
a value type), so that types and objects can be treated with more

Boost list run by bdawes at, gregod at, cpdaniel at, john at