This program
```
static_assert(
[]<int I=0>() -> decltype([]{ return true; })
{ return {}; }()());
```
is accepted in GCC, MSVC and Clang 17, but Clang 18 complains:
```
error: static assertion expression is not an integral constant expression
2 | []<int I=0>() -> decltype([]{ return true; })
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 | { return {}; }()());
| ~~~~~~~~~~~~~~~~~~
<source>:2:5: note: non-constexpr function 'operator()' cannot be used in a constant expression
<source>:2:31: note: declared here
2 | []<int I=0>() -> decltype([]{ return true; })
```
Online demo: https://gcc.godbolt.org/z/nW74e4q9v
It is a modified example from https://stackoverflow.com/q/77431308/7325599
This program
is accepted in GCC, MSVC and Clang 17, but Clang 18 complains:
Online demo: https://gcc.godbolt.org/z/nW74e4q9v
It is a modified example from https://stackoverflow.com/q/77431308/7325599