1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// DR 1586 // { dg-do run { target c++1y } } template <class T> void f (T* p) { p->~auto(); } int d; struct A { ~A() { ++d; } }; int main() { f(new int(42)); f(new A); if (d != 1) throw; (new int)->~auto(); }