Skip to content

Commit 2cdb42e

Browse files
author
Dawn Perchik
committed
CWG2360 [[maybe_unused]] and structured bindings
1 parent 53dfb04 commit 2cdb42e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

source/declarations.tex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8782,15 +8782,17 @@
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}
87908791
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}
8792+
should not emit a warning that the entity is unused.
8793+
For a structured binding declaration not marked \tcode{maybe_unused},
8794+
implementations should not emit such a warning unless
8795+
all of its structured bindings are unused.
87948796

87958797
\pnum
87968798
A name or entity declared without the \tcode{maybe_unused} attribute

0 commit comments

Comments
 (0)