News for hackers. Stuff that matters.
Re:Returning multiple values from functions in C++ by gpderetta on Monday March 07, 2016 @05:09AM (#11238037)
G++ 5.2 complains: "new types may not be defined in a return type"

An alternative in C++14:

auto hello(int c) { struct { int a; int b; } result { c, c + 1 }; return result; }

or with gcc extensions: auto hello(int c) { return (struct { int a; int b; }) { c, c + 1 }; }

There are no comments on this comment yet.