#include
#include
int main(){
auto bt=std::make_tuple(std::tuple<>(),std::tuple>()); //Line 1
auto bt2
By the way, for those who have to use gcc, let me give you a quick and dirty fix (for 4.8.0, already submitted a bug report) :
The solution is a small modification of __empty_not_final in the tuple implementation, to prevent empty base optimisation for tuple<> type :
template
using __empty_not_final
= typename conditional<__is_final(_Tp)||is_same<_Tp,tuple<>>::value,
false_type, is_empty<_Tp>>::type;
instead of
template
using __empty_not_final
= typename conditional<__is_final(_Tp), false_type, is_empty<_Tp>>::type;
(Note that, this is only an adhoc solution for tuple<> type, it does not solve the real problem described by KennyTM, i.e. struct A{}; auto d = std::tuple still does not compile)