This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem with pointer to shadowed member with namespaces


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]