In C++ I presume the C++ standard has nothing to do with how data members are arranged within a class, in terms of memory layout? Would I be right in thinking this is down t
The C++ standard does specify a few things, but far from everything.
The main rules are these:
public:
/private:
/protected:
) are laid out in memory in the order in which they're declared, but there may be an unspecified amount of padding between member objects.There are a few more bits and pieces specified by the standard, but on the whole, the remaining details are really down to the compiler.