Created on 2023-02-13.00:00:00 last changed 21 months ago
Suggested resolution:
Change in 6.6 [basic.link] paragraph 11 as follows:
For any two declarations of an entity E:
- If one declares E to be a variable or function, the other shall declare E as one of the same type.
- If one declares E to be an enumerator, the other shall do so.
- If one declares E to be a structured binding, the program is ill-formed.
- ...
Consider:
struct A { int a; }; struct B { int b; }; auto&& [x] = A{}; //#1 auto&& [x] = B{}; //#2
A rule is missing to make such repeated structured binding declarations ill-formed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-03-11 18:26:11 | admin | set | messages: + msg7226 |
2023-02-13 00:00:00 | admin | create |