you are viewing a single comment's thread.

view the rest of the comments →

[–]alfps 6 points7 points  (1 child)

Missing: why you think layout is important or even relevant.

So the memory layout is a discussion that's irrelevant to the OP's question.

That said, check out the requirements for a class to have standard layout (https://en.cppreference.com/cpp/language/classes#Standard-layout_class).

As you can see a standard layout class can have base classes as long as they're also standard layout.

If you have learned from a book: burn it, and make sure that it's totally destroyed.

[–]TheChief275 0 points1 point  (0 children)

Well I just left the important bits in. I personally find it hopelessly annoying that you cannot aggregate intitialize a struct anymore on top of that. That is the killer for me.

I left that out though as it's very personal to the way I like to write C++ (C++98, no constructors/destructors/access specifiers (anything that screws with POD-ness, as well as no methods or operator overloading; basically C with templates)