OSDN Git Service

2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / dtor7.C
1 // PR c++/40373
2 // { dg-compile }
3
4 struct A;
5 namespace
6 {
7   struct A;
8 }
9
10 struct B {};
11
12 template <typename T> void
13 foo (T t)
14 {
15   t.~A ();      // { dg-error "does not match destructor name" }
16 }
17
18 void
19 bar ()
20 {
21   foo (B ());   // { dg-bogus "instantiated from here" "" { xfail *-*-* } }
22 }