1 struct b0 2 { 3 long long m0; 4 char m1; 5 }; 6 7 struct b1 8 { 9 double m0; 10 char m1; 11 }; 12 13 struct s0 : virtual b0, virtual b1 14 { 15 typedef int integer; 16 typedef unsigned char byte; 17 18 integer m0; 19 byte m1; 20 s0s021 s0() 22 : m0(0), 23 m1(0) 24 { 25 } 26 ~s0s027 ~s0() 28 { 29 } 30 31 integer 32 mem_fun(); 33 }; 34 35 s0::integer mem_fun()36s0::mem_fun() 37 { 38 return m0 + m1; 39 } 40 41 void foo(s0 & s)42foo(s0& s) 43 { 44 s.mem_fun(); 45 } 46 47 int main()48main() 49 { 50 s0 s; 51 foo(s); 52 } 53