Struct inheritance

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Wed Dec 4 11:51:57 UTC 2024


On 05/12/2024 12:38 AM, Derek Fawcus wrote:
> For which I get:
> 
> ```
> MethB(P) Direct Parent
> MethC(P) Direct Parent
> 
> MethB(P) Inherit Parent

Due to no vtables, you cannot override a parent method and have it see 
the override.

MethC(C) Inherit Parent

> ```

The last example, assignment, this requires vtables and casting up.

Which structs cannot do.



More information about the dip.ideas mailing list