Problem with pointer to shadowed member with namespaces

Phil Blecker tmwg@inxservices.com
Thu Sep 10 10:38:00 GMT 1998


Given the following setup:

	struct OID {
		int i;
	};
	void g(OID *o);

	namespace n1 {
		struct N1 {
			OID o;
		};
	}
	namespace n2 {
		struct N2 : n1::N1 {
			OID o;

			void f();
		};
	}

	using namespace n2;

void
N2::f() {
	g(&N1::o);
}

How does one properly refer to the o in n1::N1 in a member of n2::N2?



More information about the Gcc mailing list