
Eric Niebler wrote
On 3/28/2012 9:09 AM, Eric Niebler wrote:
On 3/28/2012 4:39 AM, Michel Morin wrote:
In the code below,
const int f(); decltype(f()) i = 0;
`i` has type `int` (not `const int`) in C++11. This is because `f()` is a prvalue of a non-class type (i.e. `const int`) and so its cv qualifiers are ignored.
C++0x drafts (before FDIS) had a special rule for function calls in decltype: 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; but this was removed in FDIS. <snip>
That wording should still be FDIS. That's decltype v1.1 that Stephan was referring to in the other result_of thread you've discussed.
Unless I'm mistaken, the FDIS is N3290, and the wording is there. I have it in front of me.
Hmm…, my N3290 does not have such a wording in 7.1.6.2 (dcl.type.simple) p4. In N3291 (FDIS with diff), the wording is explicitly crossed out. Am I missing something? Regards, Michel