Use class template as a type
Basile B. via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Nov 30 13:22:53 PST 2016
On Wednesday, 30 November 2016 at 14:53:21 UTC, ag0aep6g wrote:
> On 11/30/2016 10:42 AM, Bauss wrote:
>> Usually casts to base classes can be determined if they're
>> valid at
>> compile-time.
>
> Yeah, that's what I said. A cast to a base class is an
> "upcast". Upcasts don't need run-time checks. The other
> direction (cast to more derived class) is a downcast. Downcasts
> need run-time checks.
Actually I've always called an "upcast" a "downcast" ! This
incredible misconception explains why you had to correct me after
my yesterday's answer.
More information about the Digitalmars-d-learn
mailing list