Struct Inheritance (oopsy alias this)

Sclytrack Sclytrack at pi.be
Tue Mar 11 04:02:26 PDT 2008


Forget what I said, I see that there is already something specified in the
"WalterAndrei.pdf". Something called "alias this" and I forgot about it.

"allows importing the fields of a member into the namespacece of a struct."

	struct M {int a; }
	struct S {
		M m;
		alias m this;
		int b;
	}

	S s;
	b.a;
	s.b;

Wonder if it works with member functions too.



More information about the Digitalmars-d mailing list