This code should compile but it doesn't and I don't know why: https://godbolt.org/z/c8ox9KoGY
I get this error:
<source>:1:20: error: expected identifier before '>' token
1 | template <typename T>
| ^
foo doesn't compile while bar and baz do compile. I don't know if this is a bug.
foo on gcc does compile.
template <typename T>
void foo(T& arg0, auto arg1)
{
auto func = []<typename S>(S arg){};
}
template <typename T>
void bar(T& arg0)
{
auto func = []<typename S>(S arg){};
}
template <typename T>
void baz(T& arg0, auto arg1)
{
}