#include <iostream>
#include <tuple>
#include <utility>

using namespace std;

tuple<int, double, const char *> f1()
{
	return make_tuple(10, 22.33, "ABC");
}

pair<int, int> f2()
{
	return make_pair(123, 456);
}

int main() {
	int x;
	double y;
	const char *z;
	tie(x, y, z) = f1();

	cout << x << "," << y << "," << z << endl;

	tuple_element<0, decltype(f2())>::type a;
	tuple_element<1, decltype(f2())>::type b;
	tie(a, b) = f2();
	cout << a << "," << b << endl;
}
