Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2002-03-17 07:32:39


> On conforming compilers, add_pointer<int&> is int*.
>
> I'm not sure that's desirable (perhaps int& would be better).
>
> Also, add_pointer<int[5]> is int* rather than int(*)[5] on conforming
> compilers.
>
> I /really/ can't understand why you'd want to throw out the array part.
> It seems to me that any type_traits metafunction called "add_xxx"
> shouldn't strip any features of its argument.
>
> Thoughts?

The aim is that add_pointer<T>::type is the same as the type of &t, if t is
an instance of T.

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


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