#pragma once

#include <cstddef>

namespace scratch {

template<size_t Index, typename T, typename... Rest> struct nth : nth<Index-1, Rest...> {};
template<typename T, typename... Rest> struct nth<0, T, Rest...> { using type = T; };

template<size_t Index, typename... Ts> using nth_t = typename nth<Index, Ts...>::type;

} // namespace scratch

Add a template type alias `scratch::nth_t<I, Ts...>` for the nth element of a pack.
Add a template type alias `scratch::nth_t<I, Ts...>` for the nth element of a pack.

The equivalent for (perfectly forwarded) values is basically

    std::get<I>(std::forward_as_tuple(std::forward<Vs>(vs)...))

but since I haven't implemented `std::tuple` yet, I'm passing on that one.
