Date
2015-04-15.00:00:00
Message id
5313

Content

Proposed resolution (April, 2015):

Change 9.2.9.7 [dcl.spec.auto] paragraph 7 as follows:

...If the placeholder is the decltype(auto) type-specifier, the declared type of the variable or return type of the function shall be the placeholder alone. The type deduced for the variable or return type is determined as described in 9.2.9.3 [dcl.type.simple], as though the initializer initializer-clause or expression-list of the initializer or the expression of the return statement had been the operand of the decltype. [Example:
  int i;
  int&& f();
  auto           x2a(i);    // decltype(x2a) is int
  decltype(auto) x2d(i);    // decltype(x2d) is int
  auto           x3a = i;   // decltype(x3a) is int
  decltype(auto) x3d = i;   // decltype(x3d) is int
  ...