Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 1999-12-22 18:58:10


Howard Hinnant writes:
>
> I've been experimenting with using "type" in place of "value". Which
> reads better?
>
> if (is_const<T>::value)
> ...
> or
> if (is_const<T>::type)
> ...

Another possibility is something neutral like "ret" (for return)

> I had been leaning toward "type". But you having to remind me to put the
> "typename" in is a pretty strong argument for reserving "type" for type
> names! :-)
>
> >Also, for
> >portability, keep in mind that initialization of static members inside
> >the class definition doesn't work with some compilers (even when they
> >are bool/int/etc.) Might be easier to stick with enums.
>
> OTOH, are there any compilers that do support enough partial template
> specialization to make this work, and don't support static const integral
> data initialization?

Good point. Probably not.

Cheers,

Jeremy


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