#include <tuple> #include <iostream> std::tuple<int, double, long long, char> test(int a) { return std::make_tuple(a, a*3.5, a*a, a%10 + 'a'); } int main() { int a; double b; char c; std::tie(a, b, std::ignore, c) = test(3); auto r = test(5); std::cout << std::get<0>(r) << std::get<2>(r) << std::endl; return 0; }