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
PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
pr82560.C
blob
3408bae518e5660cee7808b36993e27b82c99645
1
// { dg-do run { target c++11 } }
2
// PR82560, failed to destruct default arg inside new
3
4
static int liveness = 0;
5
6
struct Foo {
7
8
Foo (int) {
9
liveness++;
10
}
11
12
~Foo() {
13
liveness--;
14
}
15
16
};
17
18
struct Bar {
19
Bar (Foo = 0) { }
20
~Bar() { }
21
};
22
23
int main()
24
{
25
delete new Bar();
26
27
return liveness != 0;;
28
}