[Bug libstdc++/51365] cannot use final empty class in std::tuple

marc.glisse at normalesup dot org gcc-bugzilla@gcc.gnu.org
Sun Dec 11 12:55:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51365

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #9 from Marc Glisse <marc.glisse at normalesup dot org> 2011-12-11 12:12:29 UTC ---
Hello,

the recent discussion "Structure alignment changes when a constructor or
destructor is added" on gcc-help made me wonder whether it would make sense to
not only derive for empty classes, but actually derive by default and use
members only when necessary (builtin types, final classes). The advantage would
be that derivation allows for a slightly more compact representation in some
cases with the g++ ABI. I really haven't thought much about the consequences.

Sorry for hijacking this bug with this wild idea, but in case it makes sense it
might change slightly the way you want to fix it.



More information about the Gcc-bugs mailing list