|
Boost : |
Subject: Re: [boost] [result_of] Test fails on clang trunk and gcc-4.7 due to changes in FDIS
From: Eric Niebler (eric_at_[hidden])
Date: 2012-03-30 02:27:30
On 3/28/2012 3:42 PM, Eric Niebler wrote:
> On 3/28/2012 2:58 PM, Michel Morin wrote:
>> Specifically, the change is about how decltype of a function call expression
>> is determined.
>> * N3242 says that in 7.1.6.2 p4:
>> if e is a function call or an invocation of an overloaded operator
>> (parentheses around e are ignored), decltype(e) is the return type
>> of the statically chosen function;
>>
>> * N3290 (FDIS) does not have such a wording. For a function call expression,
>> decltype(e) is determined by the last rule in 7.1.6.2 p4:
>> otherwise, decltype(e) is the type of e.
Right. I spoke with James Widman about this. He says the change was not
because of the decltype v1.1 change, but rather about fixing core core
issue 1212:
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2012/n3368.html#1212
>> So, for "const int f();",
>> * In N3242, decltype(f()) is const int;
>> * In N3290, decltype(f()) is int.
>
> Ah. *Now* I see what you're saying. <palmface> I think I agree with your
> analysis, but I'm going to check with somebody real quick. It's funny, I
> don't remember this change being discussed as part of the decltype 1.1
> discussion. It was probably changed at the very last pre-FDIS committee
> meeting, which I didn't attend.
>
> Stay tuned ...
James Widman also agrees with your analysis. I guess the result_of tests
are wrong then. Could you file a bug?
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk