This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 19 December 2011 21:01, Marc Glisse wrote:#include <iostream> #include <tuple> struct A{}; int main(){ ? ? ? ?std::cout << sizeof(std::tuple<A,A,int>) << std::endl; ? ? ? ?std::cout << sizeof(std::tuple<A,int,A>) << std::endl; ? ? ? ?std::cout << sizeof(std::tuple<int,A,A>) << std::endl; }
and it output 8, 8 and 4. (if I have more than 4 A at the end, the size will increase)
I suppose I should have tested it before making that claim :)
Still, using tuple can use the EBO, even if not always optimally,
-- Marc Glisse
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |