https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000

            Bug ID: 104000
           Summary: Ordinary constructor cannot delegate to `consteval`
                    constructor
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

This program
```
struct A {       
    int i = 0;
    consteval A() = default;
    A(int) : A() {}
};
```
is accepted by Clang so I assume it is valid. But GCC complains: error: 'this'
is not a constant expression

Demo: https://gcc.godbolt.org/z/3T9Pxdoz1

Reply via email to