Pages: 1 2
Author Topic: Add a place for extra returns.  (95,751 Views)
Offline (Unknown gender) luiscubal

Member
Joined: Jun 2009
Posts: 452
View profile
Reply #15 Posted on: September 16, 2010, 10:03:33 AM
@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.
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #16 Posted on: September 16, 2010, 10:32:20 PM
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.
Pages: 1 2