Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
defaulted22.C
blob: 5afcd1deae105952c3b67d8a3515e4202e4d3953 [
file
] [
log
] [
blame
]
// Test that a virtual defaulted constructor is still virtual.
// { dg-do run { target c++11 } }
int
r
=
1
;
struct
A
{
virtual
~
A
()
=
default
;
};
struct
B
:
A
{
~
B
()
noexcept
{
r
=
0
;
}
};
A
*
ap
=
new
B
();
int
main
()
{
delete
ap
;
return
r
;
}