Re: Structure alignment changes when a constructor or destructor is added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Dec 2011, Marc Glisse wrote:

And for std::tuple, this implies that:
struct A { long a; char b; };

Argh, pasto... It was:
struct A { long a; char b; A(double); };

sizeof(std::tuple<A,char>)==24
sizeof(std::tuple<char,A>)==24
because std::tuple has A as a member. If it had A as a base class, one of those would be 16.

The ABI is fun :-)

--
Marc Glisse


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux