NicolBolas
NicolBolas
Here's a better idea than a tuple:why not return an anonymous struct: ``` auto func() { struct { bool good; int i; std::string text; } var; return var; } ```...
It should also be noted that with P0144 ([mentioned by Bjarne Stroustrup in his Kona report](https://isocpp.org/blog/2015/11/kona-standards-meeting-trip-report) ), we may have the abiliity in C++17 to do this: ``` auto {x,...
@andyprowl > The issue I see is that it does not solve the main problem - consistent naming, sensitivity to reordering of members, etc. The thing is, it's usually pretty...
> I'm not sure I can come up with a good example of such a situation. IME when a function needs to return several pieces of information, then those pieces...
@Pazns > What are, in the end, the real benefits against C-like approach, like returning error code and returned values through parameter side-effects ? That's not the "C-like approach"; indeed,...
@galik: > In fact using `tuple` & `tie` as is currently suggested will likely have greater overhead because you lose the opportunity for RVO by having to declare your variables...
FYI: Many of the issues regarding unnamed structs as return values [have been actively discussed on the std-proposals mailing list](https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/pk4s49YJpUg). That discussion started out talking about "tagged-tuples", but then it...
@pthom The principle issue with proposing an idiom is that good idioms tend to be developed by consensus. Multiple people see a problem, come up with various solutions, and the...
> Clicking on the percentage bar will also show you a list of devices supporting that extension for the given platform It does work like a link, but it's not...
That seems to be much better. Thank you!