Interleaving members

Matt Austern austern at isolde.engr.sgi.com
Fri Jun 18 17:12:14 UTC 1999


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




More information about the cxx-abi-dev mailing list