Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-07-27 16:30:00

On Jul 27, 2007, at 4:16 PM, Arkadiy Vertleyb wrote:

> "Doug Gregor" <dgregor_at_[hidden]> wrote
>> I meant, why not have the typeof library use decltype when it is
>> available? You can just predicate on BOOST_HAS_DECLTYPE, and of
>> course test with the latest GCC 4.3.
> I think BOOST_TYPEOF should continue returning consistent result
> across the
> compilers. For this, if we used decltype, we would need to remove
> top-level
> consts and refs... which doesn't seem to make a lot of sense...

   typename remove_cv<typename remove_reference<decltype(EXPR)

is still a lot simpler than what BOOST_TYPEOF has to go through to
get the type of an expression... you could save a lot of compile time
using decltype.

> Does GCC 4.3 still have typeof?

It's still there, although I don't know how useful it is.

        - Doug

Boost list run by bdawes at, gregod at, cpdaniel at, john at