[Bug libstdc++/53648] [C++11] nested empty tuples

chesstr at hotmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 12 17:13:00 GMT 2012


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

--- Comment #2 from chesstr at hotmail dot com 2012-06-12 17:13:33 UTC ---
(In reply to comment #1)
> I have a fix for this already, IIRC it's simply a case of not using the EBO for
> a tuple that contains std::tuple<>

Yes, an easy fix in tuple implementation by modifying __empty_not_final as
below compiles :


template<typename _Tp>
    using __empty_not_final
      = typename conditional<__is_final(_Tp)||is_same<_Tp,tuple<>>::value,
false_type, is_empty<_Tp>>::type;

instead of 

template<typename _Tp>
    using __empty_not_final
      = typename conditional<__is_final(_Tp), false_type, is_empty<_Tp>>::type;



More information about the Gcc-bugs mailing list