[Bug c++/93689] ICE with default argument in lambda used as non type template argument
bastien.penavayre at epitech dot eu
gcc-bugzilla@gcc.gnu.org
Wed Sep 2 10:39:30 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93689
bastien penavayre <bastien.penavayre at epitech dot eu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bastien.penavayre at epitech dot e
| |u
--- Comment #6 from bastien penavayre <bastien.penavayre at epitech dot eu> ---
It seems that it's the cast '(int)0' that causes the issue.
If we remove the cast it works fine:
```
template <
auto Z = [](int l = 0) -> int { return l; }
>
int f() {
return Z();
}
int main() {
return f();
}
```
https://godbolt.org/z/zq3E7M
More information about the Gcc-bugs
mailing list