title: Can a class with consteval constructor be created on heap in C++?
body: <p>In the following code <code>struct A</code> has immediate function default constructor, and an object of the struct is created in the dynamic memory be means of <code>new A{}</code>:</p>
  <pre><code>struct A {       
      consteval A() {}
  };
  
  int main() {
      new A{};
  }
  </code></pre>
  <p>Only Clang accepts it.</p>
  <p>GCC complains</p>
  <pre><code>error: the value of '&lt;anonymous&gt;' is not usable in a constant expression
      6 |     new A{};
        |           ^
  note: '&lt;anonymous&gt;' was not declared 'constexpr'
  </code></pre>
  <p>And MSVC does as well:</p>
  <pre><code>error C7595: 'A::A': call to immediate function is not a constant expression
  </code></pre>
  <p>Demo: <a href="https://gcc.godbolt.org/z/6Px5WYGzd" rel="noreferrer">https://gcc.godbolt.org/z/6Px5WYGzd</a></p>
  <p>Which compiler is right here?</p>