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


2706. Repeated structured binding declarations

Section: 6.6  []     Status: open     Submitter: Jim X     Date: 2023-02-13


  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.

Suggested resolution:

Change in 6.6 [] paragraph 11 as follows:

For any two declarations of an entity E: