C++ - standard-layout

244 Views Asked by At

According to the current C++ standard draft, a standard-layout class

either has no non-static data members in the most derived class and at most one base class with non-static data members, or has no base classes with non-static data members

I have yet to see any implementation that would be more efficient with this limitation. Why does it exist (except for making things more difficult)?

1

There are 1 best solutions below

3
On

The purpose of standard-layout is not efficiency, its data-interoperability with C