Subject: Re: [boost] [typeof] 2 questions
From: Peder Holt (peder.holt_at_[hidden])
Date: 2010-06-27 14:16:32
2010/5/11 Eric Niebler <eric_at_[hidden]>
> 1) Some compilers don't support typeof in any form, even emulated. From
> looking at typeof.hpp, it looks like just #include'ing typeof.hpp on
> those compilers results in a hard error. I'd like a way to test whether
> typeof is supported and use it if so, otherwise do something else. How
> can I do that?
Sorry for the long delay. I have checked in a fix for this. If you include
the typeof header on a compiler not supporting typeof emulation (read:
Borland compilers), BOOST_TYPEOF_EMULATION_UNSUPPORTED will be defined.
BOOST_TYPEOF(Expr) will expand to
> 2) I can't find "decltype" by grepping the typeof code. Why doesn't
> typeof use the decltype keyword on compilers that support it?
> And I lied. I have another question. How expensive at compile-time is
> emulated typeof?
> Eric Niebler
> BoostPro Computing
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk