Created on 2014-06-30.00:00:00 last changed 25 months ago
Rationale (November, 2014):
CWG felt that this was a question of language design and thus more properly dealt with by EWG.
EWG 2022-11-11
This is a request for a new feature, which should be proposed in a paper to EWG.
Paper N3922 changed the rules for deduction from a braced-init-list containing a single expression in a direct-initialization context. Should a corresponding change be made for decltype(auto)? E.g.,
auto x8a = { 1 }; // decltype(x8a) is std::initializer_list<int> decltype(auto) x8d = { 1 }; // ill-formed, a braced-init-list is not an expression auto x9a{ 1 }; // decltype(x9a) is int decltype(auto) x9d{ 1 }; // decltype(x9d) is int
See also issue 1467, which also effectively ignores braces around a single expression, this change would be parallel to that one, even though the primary motivation for delctype(auto) is in the return type of a forwarding function, where direct-initialization does not apply.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-24 21:03:27 | admin | set | status: extension -> nad |
2014-11-24 00:00:00 | admin | set | messages: + msg5307 |
2014-06-30 00:00:00 | admin | create |