10-05-2014, 09:24 AM
Also c++11 has hacked multiple return types into the language.
eg:
eg:
Code:
std::tuple<int,float> f()
{
return std::tuple{10,5.0};
}
void g()
{
int x;
float y;
std::tie(x,y) = f();
// x == 10, y == 5
}