Use class template as a type
ag0aep6g via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Nov 29 01:58:16 PST 2016
On 11/29/2016 02:21 AM, Basile B. wrote:
> The cast from a class type to a sub class in itself does absolutely
> nothing.
That can't be right. A bad downcast gives you null, so it has to check
the dynamic type information. Compare with upcasts which are statically
known to be correct, so they don't need to check anything at runtime.
More information about the Digitalmars-d-learn
mailing list