I need a way to generate a new tuple from another tuple.
std::string f1(int a)
{
std::string b = "hello";
return b;
}
float f2(std::string a)
{
float b = 2.5f;
return b;
}
int f3(float a)
{
int b = 4;
return b;
}
int main()
{
auto t1 = std::make_tuple(1, "a", 1.5f);
//New tuple ---> std::tuple<std::string, float, int>(f1(1), f2("a"), f3(1.5));
return 0;
}
This is just a minimal example of what I want to do. Is there a way of doing this in C++20, maybe using std::tuple_cat?