This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


1588. Deducing cv-qualified auto

Section:  []     Status: CD3     Submitter: Jens Maurer     Date: 2012-11-18

In an example like

  const auto x = 3;

the intent, clearly, is to make const int the type of x. It is not clear, however, that the current wording accomplishes this. Because the deduction is based on that of function calls, and because top-level cv-qualifiers are ignored in such deduction, it appears that [] paragraph 6,

The type deduced for the variable d is then the deduced A determined using the rules of template argument deduction from a function call ( []), where P is a function template parameter type and the initializer for d is the corresponding argument.

incorrectly gives x the type int.

Proposed resolution (April, 2013):

This issue is resolved by the wording changes in N3638, adopted at the April, 2013 (Bristol) meeting.