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-28 18:42:24
On 3/28/2012 2:58 PM, Michel Morin wrote:
> Eric Niebler wrote:
>>> Hmm , my N3290 does not have such a wording in 22.214.171.124 (dcl.type.simple) p4.
>> The (non-normative) note in 126.96.36.199 about this is in p5, not p4. But the
>> normative text is in 5.2.2 p11.
> I don't see any text about about how decltype of a function call expression
> is determined in 5.2.2 p11 or 188.8.131.52 p5.
> Sorry, my post may be misleading and not clear.
> The subject of this thread should be:
> "Test fails on clang trunk and gcc-4.7 due to changes *made* in FDIS"
> and I'm talking about the changes *made* in FDIS.
> Specifically, the change is about how decltype of a function call expression
> is determined.
> * N3242 says that in 184.108.40.206 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 220.127.116.11 p4:
> otherwise, decltype(e) is the type of e.
> 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 ...
-- 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