GCC 4.8.1:
tuple.cpp: In function 'int main()':
tuple.cpp:20:2: error: incomplete type 'TupleElement<2u, std::tuple<int, char, double> >' used in nested name specifier
TupleElement<2, decltype(myTuple)>::type d;
^
tuple.cpp:20:43: error: expected ';' before 'd'
TupleElement<2, decltype(myTuple)>::type d;
^
I think there is still some flaw still in the code, even if clang does accept it. The correct implementation I think needs to be longer than this.