Boost logo

Boost :

From: Eric Niebler (neric_at_[hidden])
Date: 2002-10-27 22:15:02


On Mon, 28 Oct 2002 04:58:46 +0100, Gabriel Dos Reis wrote:

> The way I'm intending to implement compiler support for type traits in GCC
> is to have "built-in" operators like __builtin_xxx() (xxx ranging over
> is_pod, has_trivial_copy_ctor, has_trivial_dtor, ...) to take a type-id
> and return boolean constant expression.
>
> Therefore,
>
> | template< typename T > struct is_pod
> | {
> | BOOST_STATIC_CONSTANT(bool, value =
>
> will be written
>
> BOOST_STATIC_CONSTANT(bool, value = __builtin_is_pod(T))
>

It would be nice if, like sizeof, these build-ins worked on either types
or expressions.

Eric


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