- Title
- Wording issues regarding decltype(auto)
- Status
- cd4
- Section
- 9.2.9.3 [dcl.type.simple]
- Submitter
- Daveed Vandevoorde
Created on 2014-02-04.00:00:00 last changed 116 months ago
Messages
Date: 2014-11-15.00:00:00
[Moved to DR at the November, 2014 meeting.]
Date: 2014-02-15.00:00:00
Proposed resolution (February, 2014): Change 9.2.9.3 [dcl.type.simple] paragraph 2 as follows: Change 9.2.9.7 [dcl.spec.auto] paragraph 1 as follows: The auto and decltype(auto) type-specifiers
are used to designate a placeholder type that will be replaced
later
The simple-type-specifier auto
specifier
is a placeholder for a type to be deduced
(9.2.9.7 [dcl.spec.auto]). The other simple-type-specifiers...
, either by deduction from an initializer or by
explicit specification with a trailing-return-type. The
auto type-specifier is also used to introduce a
function type having a trailing-return-type or to signify that
a lambda is a generic lambda.
Date: 2014-02-04.00:00:00
According to 9.2.9.3 [dcl.type.simple] paragraph 2, This is not true when auto appears in the
decltype(auto) construct. On a slightly related wording issue, 9.2.9.7 [dcl.spec.auto] paragraph 2
says, This could be read as implying that decltype(auto)
can be used to introduce a function with a
trailing-return-type, contradicting 9.3.4.6 [dcl.fct] paragraph 2,
which requires that a function declarator with a
trailing-return-type must have auto as the sole
type specifier.
The auto specifier is a placeholder for a type to be deduced
(9.2.9.7 [dcl.spec.auto]).
The auto and decltype(auto) type-specifiers
designate a placeholder type that will be replaced later, either by
deduction from an initializer or by explicit specification with
a trailing-return-type.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-02-06 00:00:00 | admin | set | status: drwp -> cd4 |
| 2015-05-25 00:00:00 | admin | set | status: dr -> drwp |
| 2015-04-13 00:00:00 | admin | set | messages: + msg5362 |
| 2014-11-24 00:00:00 | admin | set | status: ready -> dr |
| 2014-03-03 00:00:00 | admin | set | messages: + msg4823 |
| 2014-02-04 00:00:00 | admin | create | |