// { dg-do compile { target c++23 } }struct A { ~A(); };struct B {constexprB() {
A a;for(int i =0; i <10; i++) { }}// { dg-error "call to non-'constexpr' function 'A::~A..'" }};constexprboolf() {
B b;// { dg-error "B::B..' called in a constant expression" }return true;}static_assert(f());// { dg-error "non-constant" }