Closed MC-DeltaT closed 2 years ago
Name of the lexer C++
Code sample
template<auto F = []{}> void func();
Demo: http://rouge.jneen.net/v3.29.0/cpp/dGVtcGxhdGU8YXV0byBGID0gW117fT4Kdm9pZCBmdW5jKCk7Cg
Additional context In general, I'd expect that any expression is valid in a template argument default.
Actually seems like any braces in a template argument default is incorrectly highlighted as an error.
E.g. with a requires expression:
requires
template<auto F = requires { foo(); }> void func();
Demo: http://rouge.jneen.net/v3.29.0/cpp/dGVtcGxhdGU8YXV0byBGID0gcmVxdWlyZXMgeyBmb28oKTsgfT4Kdm9pZCBmdW5jKCk7Cg
Name of the lexer C++
Code sample
Demo: http://rouge.jneen.net/v3.29.0/cpp/dGVtcGxhdGU8YXV0byBGID0gW117fT4Kdm9pZCBmdW5jKCk7Cg
Additional context In general, I'd expect that any expression is valid in a template argument default.