Ferdi265 wrote:

There is also another thing that is **fixed** by this PR but that I did not 
intend to fix.

Previously, Clang accepted code that stores a pointer to a function converted 
from a consteval generic lambda in a non-constexpr variable (GCC rejects this):

```c++
int main() {
    auto a = [](auto)consteval{return 3;};
    int(*b)(int) = a;
}
``` 

Since the conversion operator is now an immediate function, the call to it is 
now diagnosed at the conversion site. I don't understand why this did not 
trigger `cannot take address of consteval call operator` in Clang trunk 
though...

https://github.com/llvm/llvm-project/pull/235356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to