Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-11-03 07:39:56


>"All" makes me a little nervous. I would expect is_same<int,const
>int>::value to be false. I suspect you were not speaking of is_same when
>you said "All", but I thought I'd better double check.

Yes that's what I meant, even if it's not what I said :-)

>How about adding:
>
>is_signed
>is_unsigned
>

Currently they're called is_signed_integral and is_unsigned_integral

>Admittedly you should also be able to get this info from numeric_limits.
>But is_signed is arguably more convenient.
>
>template <class T> struct is_signed
> {static const bool value = T(-1) < T(0);};

OK but that only works if T is already an arithmetic type, there are
workarounds though...

>snipped

I pretty well agree with the rest.

- John.


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