How to get child class Type and members from parent class?
Adam D. Ruppe
destructionator at gmail.com
Wed Nov 20 22:26:17 UTC 2019
On Wednesday, 20 November 2019 at 20:57:56 UTC, Matheus wrote:
> This is a different way of designing things, do people use this
> often?
This is really only useful sometimes.
It is important to notice that if you do
class C : I {}
I c = new C();
c.something();
the template this there will show I, not C. All it means is this
is being called on an object of that *static* type. So it isn't
really a substitute for traditional virtual functions.
Sometimes appropriate to use, just often not.
More information about the Digitalmars-d-learn
mailing list