For example, I have a class
,
class naive {
public:
char a;
long long b;
char c;
int d;
};
and according to my testing program, a
to d
are built one after another, like
a-------
bbbbbbbb
c---dddd
-
means unused.
Why does not C++ make it tighter, like
ac--dddd
bbbbbbbb
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…