Commit 6aede567 by Jason Merrill

update

From-SVN: r32214
parent 1ab83276
......@@ -23,8 +23,8 @@ class multiple : public bar_1, public bar_2 {
public:
multiple(int i1, int i2) : bar_1(i1), bar_2(i2) {}
void print() {
cout << "bar_1::k -> " << bar_1::k << "\n";
cout << "bar_2::k -> " << bar_2::k << "\n";
cout << "bar_1::k -> " << ((bar_1 *)this)->k << "\n";
cout << "bar_2::k -> " << ((bar_2 *)this)->k << "\n";
cout << "bar_1::get_k() -> " << bar_1::get_k() << "\n";
cout << "bar_2::get_k() -> " << bar_2::get_k() << "\n";
}
......
......@@ -26,7 +26,7 @@ class base3: public base {};
class derived: public base3, public base1, public base2 {
public:
int d_data;
derived( int i ) { d_data = i; base3::b_data++; }
derived( int i ) { d_data = i; ((base3 *)this)->b_data++; }
void d_print() { }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment