repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2017-06-14 Paolo Carlini <paolo.carlini@oracle.com>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
dtor5.C
blob
8fa4eeb6f069176f4a239094d622d34571044b93
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
}