Pages: 1 [2]
  Print  
Author Topic: Add a place for extra returns.  (Read 1003 times)
Offline (Unknown gender) luiscubal
Reply #15 Posted on: September 16, 2010, 05:03:33 AM
Member
Joined: Jun 2009
Posts: 476

View Profile Email
@RetroX Yes, and variable-length pairs seem like a good replacement of tuples(I don't know enough about the internal implementations to discuss whether they are equivalent).
Of course, the existence of pairs isn't mutually exclusive to syntax sugar.
Logged
Offline (Male) RetroX
Reply #16 Posted on: September 16, 2010, 05:32:20 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1121
MSN Messenger - classixretrox@gmail.com
View Profile Email
Alternatively, use 0x's initaliser lists for var args and return vectors.

template<typename type> std::vector<type> some_function(std::vector<type> args);
some_function({1,2,3,...});

Speaking of which, ENIGMA's var should support operator= with initialiser lists.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Pages: 1 [2]
  Print