Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
inherit
/
virtual14.C
blob: 17aabf31ad032ada6d0ff63d056beb3f32adeff1 [
file
] [
log
] [
blame
]
// { dg-do run }
struct
base
{
virtual
operator
int
()
{
return
0
;}
};
typedef
int
q
;
struct
d
:
base
{
operator
q
()
{
return
1
;
}
};
int
invoke
(
base
*
d
)
{
return
int
(*
d
);
}
int
main
()
{
d d
;
return
!(
invoke
(&
d
)
==
1
);
}