Can we just have struct inheritence already?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jun 10 10:05:57 UTC 2019


On Monday, 10 June 2019 at 03:08:26 UTC, Walter Bright wrote:
> There are some rules in C++ where sometimes a struct with no 
> fields occupies 1 byte, sometimes 0 bytes. I don't recall what 
> they are at the moment.

Yes, empty base class optimization:

https://en.cppreference.com/w/cpp/language/ebo



More information about the Digitalmars-d mailing list