#include <iostream>
#include <utility>
#include <tuple>
template<typename T>
struct second_type
{
using type = void;
};
template<typename T, typename U, typename... Args>
struct second_type<std::tuple<T, U, Args...>>
{
using type = U;
};
template<typename T, typename... Args>
typename second_type<std::tuple<T, Args...>>::type get_second(const T& t, const Args&... args)
{
return std::get<0>(std::make_tuple(args...));
}
int main()
{
std::cout << get_second<int, const char*, double>(1, "hello", 3.14) << std::endl;
return 0;
}