Interleaving members
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Interleaving members



I asked on the reflector: yes, given the class
  struct X {
  public:
    int a, b;
  public:
    int c, d;
  };
it is legal to have the layout A C B D.  This was intentional; we
aren't just exploiting a loophole in the wording.  Interestingly,
Bjarne says that this was also true (and equally intentional) in
the ARM.

I still don't know of any implementation that actually does this.

			--Matt