PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / pseudodtor3.C
blob21a68aaac45f83f4076a3231a50afac0397c99b3
1 // PR c++/32241
2 // { dg-do compile }
4 struct A
6   typedef int T;
7   T &foo ();
8   A () { foo.~T (); }   // { dg-error "10:invalid use of member function|expected" }
9 };
11 template <typename T> struct B
13   T &foo ();
14   B () { foo.~T (); }   // { dg-error "10:invalid use of member" }
17 B<int> b;
19 template <typename T, typename S> struct C
21   T t;
22   C () { t.~S (); }     // { dg-error "13:is not of type" }
25 C<int, long int> c;
27 template <typename T> struct D
29   T t;
30   typedef long int U;
31   D () { t.~U (); }     // { dg-error "10:is not of type" }
34 D<int> d;
36 template <typename T> struct E
38   T &foo ();
39   typedef long int U;
40   E () { foo.~U (); }   // { dg-error "10:invalid use of member" }
43 E<int> e;