bottom type as parameter or local variable, does that make sense?

Elronnd elronnd at elronnd.net
Mon Jan 17 18:32:19 UTC 2022


On Monday, 17 January 2022 at 18:05:49 UTC, H. S. Teoh wrote:
>> What happens if you pass in an A*, and A.sizeof>B.sizeof?
>
> This is exactly what happens when you pass a derived class to a 
> function that expects the base class, BTW.

You can't do pointer arithmetic on class instances.


More information about the Digitalmars-d mailing list