He does this in a way, he says that he should allocate space for him, if not certain cases, when he is used as a base class (known as "Optimizing an empty base class"). This ensures that different objects have different addresses.
They are compiled in the same way that struct and class are the same thing, with the exception of the default access specifier. C ++ 11 introduces the concept of standard layout classes / structures and ensures that the memory layout for empty classes is the same.
K-ballo
source share