- Title
- Deducing cv-qualified auto
- Status
- cd3
- Section
- 9.2.9.7 [dcl.spec.auto]
- Submitter
- Jens Maurer
Created on 2012-11-18.00:00:00 last changed 152 months ago
Messages
Date: 2013-04-15.00:00:00
Proposed resolution (April, 2013): This issue is resolved by the wording changes in N3638, adopted
at the April, 2013 (Bristol) meeting.
Date: 2012-11-18.00:00:00
In an example like 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 9.2.9.7 [dcl.spec.auto] paragraph 6,
incorrectly gives x the type int .
const auto x = 3;
The type deduced for the variable d is then the deduced
A determined using the rules of template argument deduction
from a function call (13.10.3.2 [temp.deduct.call]), where P
is a function template parameter type and the initializer for
d is the corresponding argument.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
| 2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
| 2013-05-03 00:00:00 | admin | set | messages: + msg4401 |
| 2013-05-03 00:00:00 | admin | set | status: open -> dr |
| 2012-11-18 00:00:00 | admin | create | |