This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-10-26


1212. Non-function-call xvalues and decltype

Section: 9.2.9.3  [dcl.type.simple]     Status: C++11     Submitter: Daniel Krügler     Date: 2010-10-21

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Given

    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 9.2.9.3 [dcl.type.simple] paragraph 4 as follows:

The type denoted by decltype(e) is defined as follows: