Q:

How does tuple& base = t; work in tuple implementation

When I read post Variadic templates in C++, I could not get one line in the implementation of tuple. 
template <size_t k, class... Ts>
typename std::enable_if<
    k == 0, typename elem_type_holder<0, tuple<Ts...>>::type&>::type
get(tuple<Ts...>& t) {
  return t.tail;
}

template <size_t k, class T, class... Ts>
typename std::enable_if<
    k != 0, typename elem_type_holder<k, tuple<T, Ts...>>::type&>::type
get(tuple<T, Ts...>& t) {
  tuple<Ts...>& base = t;
  return get<k - 1>(base);
}

What does tuple<Ts...>& base = t; mean? I think type of t is tuple<T, Ts...>& which cannot be converted to tuple<Ts...>&. 

A:

It is a conversion from a derived class reference to a base class reference which is a perfectly valid C++ code.
As you might see in the implementation, tuple<T, Ts...> is derived from tuple<Ts...>:
template <class... Ts> struct tuple {};

template <class T, class... Ts>
struct tuple<T, Ts...> : tuple<Ts...> {
  tuple(T t, Ts... ts) : tuple<Ts...>(ts...), tail(t) {}

  T tail;
};

As t has a type of tuple<T, Ts...>&, you might cast it to tuple<Ts...>& and "throw out" one element from the tuple.

