Can we just have struct inheritence already?

Vladimir Panteleev thecybershadow.lists at gmail.com
Sat Jun 15 10:20:46 UTC 2019


On Saturday, 15 June 2019 at 10:19:25 UTC, Vladimir Panteleev 
wrote:
> On Thursday, 13 June 2019 at 12:20:14 UTC, Patrick Schluter 
> wrote:
>> Especially if you use C allocation realloc() as calling it 
>> with size 0 is synonymous to free(). Ouch!
>
> When would that be a problem? Any pointer is a valid pointer 
> for a zero-sized object, as it can never be meaningfully 
> "dereferenced" (never minding only pretending to do that for 
> purposes of metaprogramming and such).

Oh, I guess it would be an issue if you tried to grow it back to 
non-zero size.


More information about the Digitalmars-d mailing list