Boost logo

Boost :

Subject: Re: [boost] [result_of] BOOST_RESULT_OF_USE_DECLTYPE in a C++03 mode with libc++
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-10-08 12:59:53

Eric Niebler wrote:
> On 10/8/2012 6:08 AM, Michel Morin wrote:
>> This is just a small note related to boost::result_of.
>> boost::result_of tries to use decltype-based implementation
>> (regardless of the compiler's decltype support).
>> Surprisingly, in a C++03 mode, libc++ defines `decltype`
>> using `__typeof__`:
>> Bug 12488 (WONTFIX):
>> decltype can be used in C++03 with no errors, no warnings
>> So, when used with libc++, boost::result_of can be used with
>> BOOST_RESULT_OF_USE_DECLTYPE even in a C++03 mode.
> Does __typeof__ have EXACTLY the same semantics as C++11 decltype?

No, it doesn't.
I don't like the idea of defining `decltype` macro in libc++:

  #define decltype(x) __typeof__(x)

I created the bug report to libc++, but it got WONTFIX.


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