
Eric Niebler wrote:
Hmm…, my N3290 does not have such a wording in 7.1.6.2 (dcl.type.simple) p4.
The (non-normative) note in 7.1.6.2 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 7.1.6.2 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 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. So, for "const int f();", * In N3242, decltype(f()) is const int; * In N3290, decltype(f()) is int. Regards, Michel