In the following struct definition, the constructor A(int) delegates its work to immediate-function constructor A():
struct A {
int i = 0;
consteval A() = default;
A(int) : A() {}
};
Clang accepts it, but not GCC complaining:
error: 'this' is not a constant expression
and MSVC:
'A::A': call to immediate function is not a constant expression
Demo: https://gcc.godbolt.org/z/7e3fWzYzr
Which compiler is correct?