
17 Feb
2004
17 Feb
'04
12:01 p.m.
Gabriel Dos Reis wrote:
David Abrahams <dave@boost-consulting.com> writes:
Shall we outlaw:
struct Base { static int x; };
struct Derived : Base { void f(int x) {} // Horrors! we're masking a base class member!
If you happen to pause a second and have look at the issue at hand, I'm confident that you'll see the difference between the case we're discussing and your example.
};
I think that you win the consistency argument. struct X { typedef void Y; typedef void Z; }; struct Y { }; template<class Z> struct V: public Y, public X { Y y; // X::Y Z z; // X::Z }; Very counter-intuitive since C++ code usually respects locality of reference, but consistent.