|
Boost : |
Subject: Re: [boost] [Config] N3276 decltype support on VC++ 11
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-09-10 21:18:59
Stephan T. Lavavej wrote:
> [Michel Morin]
>> For a function `const int f()`, `decltype(f())` returns `int` on VC++ 11.
>> So some `result_of` tests fail as in #6754.
>> ( https://svn.boost.org/trac/boost/ticket/6754 )
>> Clang 3.1 and gcc 4.7-4.8 behaves similarly, and this behavior
>> conforms to the C++11 Standard.
>
> I'm confused, because I observe this with VC11 RTM:
>
> const int f() { return 1729; }
>
> int main() {
> Print<decltype(f())>::print();
> }
>
> C:\Temp>meow
> const int
(I rearranged the code above for readability.)
Thanks for pointing this out, Stephan.
It's highly possible that I did a wrong test.
(I usually use cvref-preserving type-name printer. But, when I used VC++ 11,
I think I used typeid + name() for getting the type-name.)
So,
"For a function `const int f()`, `decltype(f())` returns `int` on VC++ 11."
is wrong.
VC++11 implements N3276 decltype, but not FDIS decltype.
Sorry for the confusion.
Regards,
Michel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk