Should this always work?
Mike Parker
aldacron at gmail.com
Sat May 1 15:52:52 UTC 2021
On Saturday, 1 May 2021 at 15:21:28 UTC, frame wrote:
>
> btw: why is it even allowed to create an instance via cast as
> an abstract thing?
No instance is being created by the cast. The instance already
exists. The cast just allows you to treat the pointer to the
instance as a specific type. It’s no different than casting from
C to A really. You just have the void* as an intermediary.
More information about the Digitalmars-d-learn
mailing list