Empty base MSVC optimization

Empty database optimization with multiple inheritance still needs to be broken in msv ++ 2010. Currently it works only for the first type, derived from, so if you are extracting from several empty bases, the child type ends with a large number of bytes (just a useless addition !) than you need.

Apparently, this has been the case for some time: https://connect.microsoft.com/VisualStudio/feedback/details/100686/empty-member-optimization-not-working-properly

This link is marked "closed - not fixed." Just wondering if anyone knew if anything was happening with this β€œfeature” these days?

+2
source share
1 answer

Empty database optimization with multiple inheritance should still be broken in msv ++ 2010

What do you mean by broken? Is this not a standard match?

The standard does not require empty classes to be zero in size when they are received. An implementation may decide to optimize this or it may not be at all.

+3
source

Source: https://habr.com/ru/post/976430/


All Articles