This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51365] cannot use final empty class in std::tuple
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Dec 2011 13:51:20 +0000
- Subject: [Bug libstdc++/51365] cannot use final empty class in std::tuple
- Auto-submitted: auto-generated
- References: <bug-51365-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51365
--- Comment #11 from Marc Glisse <marc.glisse at normalesup dot org> 2011-12-11 13:51:20 UTC ---
(In reply to comment #10)
> I haven't really thought about it either, but one advantage of depending on
> is_empty is that it prevents using the EBO for polymorphic classes, where
> derivation could have undesirable effects.
Ah, right, the set of types that can safely be derived from is rather
restricted: non-builtin, non-final, non-virtual (and possibly more
constraints). And to benefit from additional packing: non-C++03-POD. Probably
not worth the trouble...