What this C++ lambda syntax question tests
This is an easy multiple-choice question that probes your knowledge of C++ lambda syntax and the valid positions for lambda qualifiers and specifiers. It rewards familiarity with the formal grammar of lambda declarations rather than runtime behavior.
Lambda expressions in C++ support several optional clauses and keywords between the parameter list and the function body—including mutable, constexpr, noexcept, and trailing return types. This question targets whether you know which constructs are syntactically permitted in that position and which are not, a useful checkpoint when writing or reviewing modern C++ code.
- Lambda capture lists and their constraints
- Parameter list syntax and cv-qualifiers
- Trailing return types and decltype
- constexpr and mutable specifiers
- noexcept exception specifications