Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-10-28 00:00:15


"Eric Niebler" <neric_at_[hidden]> writes:

| 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.

Well, I don't have plan to add that support. The compile-time
reflectional thingy I'm designing will work at a purely type level just
as "compiler support" for type-traits and other meta-programming stuff.

Since GCC already has a support for some kind of typeof(), I don't
beleive we'll be missing any essential functionality.

-- Gaby


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