Debian Codegraph @

gcc/testsuite/g++.dg/template/pseudodtor1.C

raw
1 // PR c++/32384
2 // { dg-do compile }
3
4 struct A
5 {
6 typedef int T;
7 T foo ();
8
9 A () { foo ().~T (); }
10 };
11
12 template<typename> struct B
13 {
14 typedef int T;
15 T foo ();
16
17 B () { foo ().~T (); }
18 };
19
20 template<typename T> struct C
21 {
22 T t;
23 C () { t.~T (); }
24 };
25
26 template<typename S> struct D
27 {
28 typedef int T;
29 S foo ();
30
31 D () { foo ().~T(); }
32 };
33
34 struct Z
35 {
36 Z () {}
37 ~Z () {}
38 };
39
40 A a;
41 B<int> b;
42 C<int> c1;
43 C<Z> c2;
44 D<int> d;