[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

Stephan Bergmann via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 10 14:38:54 PDT 2024


stbergmann wrote:

This change started to cause
```
$ cat test.cc
template<typename T> struct P {
    ~P() { p->f(); }
    T * p;
};
struct X;
struct B { virtual ~B(); };
struct S: B { P<X> x; };
```
```
$ clang++ -std=c++23 -fsyntax-only test.cc
test.cc:2:13: error: member access into incomplete type 'X'
    2 |     ~P() { p->f(); }
      |             ^
test.cc:7:8: note: in instantiation of member function 'P<X>::~P' requested here
    7 | struct S: B { P<X> x; };
      |        ^
test.cc:5:8: note: forward declaration of 'X'
    5 | struct X;
      |        ^
1 error generated.
```
to fail, which I think is not intentional?

https://github.com/llvm/llvm-project/pull/77753


More information about the cfe-commits mailing list