This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
[Voted into the WP at the March, 2011 meeting as part of paper N3262.]
int&& f(); int i;
it is surprising that decltype(f()) and decltype(static_cast<int&&>(i)) are not the same type.
Proposed resolution (November, 2010) [SUPERSEDED]:
Change 126.96.36.199 [dcl.type.simple] paragraph 4 as follows:
The type denoted by decltype(e) is defined as follows:
if e is an unparenthesized id-expression or a class member access (188.8.131.52 [expr.ref]), decltype(e) is the type of the entity named by e. If there is no such entity, or if e names a set of overloaded functions, the program is ill-formed;
otherwise, if e is
a function call (184.108.40.206 [expr.call]) or an invocation of an overloaded operator (parentheses around e are ignored), decltype(e) is the return type of the statically chosen function;
otherwise, if e is an lvalue, decltype(e) is T&, where T is the type of e;
otherwise, decltype(e) is the type of e.