Skip to content

Commit 27f5ad5

Browse files
Dawn Perchikzygoloid
authored andcommitted
CWG2360 [[maybe_unused]] and structured bindings
1 parent 9f5c64c commit 27f5ad5

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

source/declarations.tex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8782,15 +8782,19 @@
87828782

87838783
\pnum
87848784
The attribute may be applied to the declaration of a class,
8785-
a \grammarterm{typedef-name}, a variable, a non-static data member,
8785+
a \grammarterm{typedef-name},
8786+
a variable (including a structured binding declaration),
8787+
a non-static data member,
87868788
a function, an enumeration, or an enumerator.
87878789

87888790
\pnum
8789-
\begin{note}
8790-
For an entity marked \tcode{maybe_unused}, implementations
8791-
should not emit a warning that the entity is unused, or
8792-
that the entity is used despite the presence of the attribute.
8793-
\end{note}
8791+
For an entity marked \tcode{maybe_unused},
8792+
implementations should not emit a warning
8793+
that the entity or its structured bindings (if any)
8794+
are used or unused.
8795+
For a structured binding declaration not marked \tcode{maybe_unused},
8796+
implementations should not emit such a warning unless
8797+
all of its structured bindings are unused.
87948798

87958799
\pnum
87968800
A name or entity declared without the \tcode{maybe_unused} attribute

0 commit comments

Comments
 (0)