https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000
--- Comment #5 from Fedor Chelnokov ---
Based on stackoverflow answer, a modified example was found with the delegation
to consteval constructor:
```
struct A {
int i = 0;
consteval A() = default;
A(const A&) = delete;
A(i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000
--- Comment #4 from Fedor Chelnokov ---
If we take MSVC into consideration, then it rejects
```
struct A {
consteval A() = default;
A(int) : A() {}
};
```
which GCC accepts. So there is a divergence with MSVC as
well.https://gcc.g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000
Andrew Pinski changed:
What|Removed |Added
Ever confirmed|1 |0
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed||2022-01-21
Status|UNCONFIRM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000
--- Comment #1 from Andrew Pinski ---
The error is:
: In constructor 'A::A(int)':
:5:16: error: 'this' is not a constant expression
5 | A(int) : A() {}
|^