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

            Bug ID: 104087
           Summary: Invoking a consteval constructor with new
           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: ---

In the following program
```
struct A {       
    consteval A() {}
};

int main() {
    new A(); // ok in GCC
    new A; //error in GCC
}
```
GCC accepts the first new, but reject the second new. It is at least
inconsistent. Demo: https://gcc.godbolt.org/z/onzeo6Peo

According to this discussion https://stackoverflow.com/q/70743728/7325599 both
`new`s are invalid.

Reply via email to