[Bug libstdc++/56785] std::tuple of two elements does not apply empty base class optimization when one of its elements is a std::tuple with two elements

gcc-bugzilla at contacts dot eelis.net gcc-bugzilla@gcc.gnu.org
Mon Jun 16 19:01:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56785

Eelis <gcc-bugzilla at contacts dot eelis.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc-bugzilla at contacts dot eelis
                   |                            |.net

--- Comment #2 from Eelis <gcc-bugzilla at contacts dot eelis.net> ---
Another manifestation of this is that 

  sizeof(pair<pair<char,char>,pair<char,char>>) == 4

while

  sizeof(tuple<tuple<char,char>,tuple<char,char>>) == 5 (!!).

I think that at the moment, GCC users are best advised to avoid using stdlib
tuples if efficiency is a concern.



More information about the Gcc-bugs mailing list