OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
/cp
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
dtor5.C
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
}