Skip to content

Commit 0fbb2f2

Browse files
committed
CWG2509 decl-specifier-seq in lambda-specifiers
1 parent dc697e5 commit 0fbb2f2

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

source/expressions.tex

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,20 @@
16901690

16911691
\begin{bnf}
16921692
\nontermdef{lambda-specifiers}\br
1693-
\opt{decl-specifier-seq} \opt{noexcept-specifier} \opt{attribute-specifier-seq} \opt{trailing-return-type}
1693+
\opt{lambda-specifier-seq} \opt{noexcept-specifier} \opt{attribute-specifier-seq} \opt{trailing-return-type}
1694+
\end{bnf}
1695+
1696+
\begin{bnf}
1697+
\nontermdef{lambda-specifier}\br
1698+
\keyword{consteval}\br
1699+
\keyword{constexpr}\br
1700+
\keyword{mutable}
1701+
\end{bnf}
1702+
1703+
\begin{bnf}
1704+
\nontermdef{lambda-specifier-seq}\br
1705+
lambda-specifier\br
1706+
lambda-specifier lambda-specifier-seq
16941707
\end{bnf}
16951708

16961709
\pnum
@@ -1715,12 +1728,12 @@
17151728
\end{note}
17161729

17171730
\pnum
1718-
In the \grammarterm{decl-specifier-seq} of the \grammarterm{lambda-declarator},
1719-
each \grammarterm{decl-specifier}
1720-
shall be one of \keyword{mutable}, \keyword{constexpr}, or \keyword{consteval}.
1731+
A \grammarterm{lambda-specifier-seq}
1732+
shall contain at most one of each \grammarterm{lambda-specifier} and
1733+
shall not contain both \keyword{constexpr} and \keyword{consteval}.
17211734
If the \grammarterm{lambda-declarator} contains
17221735
an explicit object parameter\iref{dcl.fct},
1723-
then no \grammarterm{decl-specifier} in the \grammarterm{decl-specifier-seq}
1736+
then no \grammarterm{lambda-specifier} in the \grammarterm{lambda-specifier-seq}
17241737
shall be \keyword{mutable}.
17251738
\begin{note}
17261739
The trailing \grammarterm{requires-clause} is described in \ref{dcl.decl}.

0 commit comments

Comments
 (0)