Skip to content

Commit d109ad5

Browse files
committed
[expr.prim.lambda] Move syntactic restriction on decl-specifier-seq to the front.
Per CWG guidance.
1 parent 98c634c commit d109ad5

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
@@ -634,6 +634,11 @@
634634
A closure object behaves like a function
635635
object~(\ref{function.objects}).\end{note}
636636

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

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

0 commit comments

Comments
 (0)