Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
other
/
virtual3.C
blob: 55c81855714ad72954d99cf724a2d01e3fcbe907 [
file
] [
log
] [
blame
]
// PR c++/58923
struct
A
{
virtual
void
do_it
()
const
=
0
;
};
struct
B
:
A
{
virtual
void
do_it
()
const
{}
};
struct
C
{
operator
B
()
const
{
return
B
();
}
};
void
do_it
(
const
A
&
a
)
{
a
.
do_it
();
}
int
main
()
{
C c
;
do_it
(
c
);
return
0
;
}