Skip to content

Commit 09e4674

Browse files
jensmaurerzygoloid
authored andcommitted
[expr.prim.lambda] Move syntactic restriction on decl-specifier-seq to the front.
Per CWG guidance.
1 parent 763a3fd commit 09e4674

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/expressions.tex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,11 @@
635635
A closure object behaves like a function
636636
object~(\ref{function.objects}).\end{note}
637637

638+
\pnum
639+
In the \grammarterm{decl-specifier-seq} of the \grammarterm{lambda-declarator},
640+
each \grammarterm{decl-specifier}
641+
shall either be \tcode{mutable} or \tcode{constexpr}.
642+
638643
\pnum
639644
If a \grammarterm{lambda-expression} does not include a
640645
\grammarterm{lambda-declarator}, it is as if the \grammarterm{lambda-declarator} were
@@ -727,9 +732,6 @@
727732
\end{example}
728733

729734
\pnum
730-
In the \grammarterm{decl-specifier-seq} of the \grammarterm{lambda-declarator},
731-
each \grammarterm{decl-specifier}
732-
shall either be \tcode{mutable} or \tcode{constexpr}.
733735
The function call operator or operator template is declared
734736
\tcode{const}~(\ref{class.mfct.non-static}) if and only if the
735737
\grammarterm{lambda-expression}'s \grammarterm{parameter-declaration-clause} is not

0 commit comments

Comments
 (0)