Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/dtor5.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/23287 |
2 | |
3 template <class T> struct A | |
4 { | |
5 int i; | |
6 ~A(); | |
7 }; | |
8 | |
9 template <class T> void f(A<T> *ap) { | |
10 ap->~A(); | |
11 } | |
12 | |
13 template <class T> void g(A<T> *ap) { | |
14 ap->~B(); // { dg-error "destructor name" } | |
15 } | |
16 | |
17 int main() | |
18 { | |
19 f(new A<int>); | |
20 g(new A<int>); | |
21 } |