|
-
May 23rd, 2010, 06:14 PM
#8
Re: C++0x fails: no multiple return values
Yeah, but Boost tuple kind of makes the other method with passing pointers more convenient...
If you were really using it you'd (hopefully) be using typedefs to reduce the template mess.
Well, I guess if they don't want to add tuples to C++ they won't, but I don't see any problems with adding it. It will still be backwards compatible and the compiler will optimize automatically to remove temporary variables...
Turns out they're already in TR1
I wouldn't be surprised if the biggest problem with directly adding the ability to return multiple values to C++ is syntax. The example you gave in the OP wouldn't work because of the comma operator. So they'd have to come up with something totally new that wouldn't interfere with anything already existing... making an already difficult to parse language that much worse.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|