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
/
defaulted22.C
blob
5afcd1deae105952c3b67d8a3515e4202e4d3953
1
// Test that a virtual defaulted constructor is still virtual.
2
// { dg-do run { target c++11 } }
3
4
int r = 1;
5
6
struct A
7
{
8
virtual ~A() = default;
9
};
10
11
struct B: A
12
{
13
~B() noexcept { r = 0; }
14
};
15
16
A* ap = new B();
17
18
int main()
19
{
20
delete ap;
21
return r;
22
}