Skip to content

Commit e863fc4

Browse files
Dawn Perchikzygoloid
authored andcommitted
P0969R0 Allow structured bindings to accessible members
1 parent 1cfcbd0 commit e863fc4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

source/declarators.tex

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,11 +2370,15 @@
23702370
the referenced type is $\tcode{T}_i$.
23712371

23722372
\pnum
2373-
Otherwise, all of \tcode{E}'s non-static data members shall be public direct
2374-
members of \tcode{E} or of the same unambiguous public base class of \tcode{E},
2375-
\tcode{E} shall not have an anonymous union member, and the number of elements
2376-
in the \grammarterm{identifier-list} shall be equal to the number of non-static
2377-
data members of \tcode{E}.
2373+
Otherwise,
2374+
all of \tcode{E}'s non-static data members
2375+
shall be direct members of \tcode{E} or
2376+
of the same base class of \tcode{E},
2377+
well-formed when named as \tcode{e.\placeholder{name}}
2378+
in the context of the structured binding,
2379+
\tcode{E} shall not have an anonymous union member, and
2380+
the number of elements in the \grammarterm{identifier-list} shall be
2381+
equal to the number of non-static data members of \tcode{E}.
23782382
Designating the non-static data members of \tcode{E} as
23792383
\tcode{m}$_0$, \tcode{m}$_1$, \tcode{m}$_2$, ...
23802384
(in declaration order),

0 commit comments

Comments
 (0)