Le 24/09/2012 16:59, foobar a écrit :
I'm a bit confused about what is specifically proposed here: - Is the suggestion to limit tuples to >1 elements? *This* I'm against for practical as well as completeness reasons. Andrei already provided one example, and another would be a proper unit type. e.g. void foo(int a) {} void bar (int b) { return foo(b); } - Is the suggestion to allow implicit conversion between (T) and T? This brings almost no benefit - (you save two keystrokes?) and adds a special case to the language. The added complexity really does not justify this.
In fact, they don't need to unpack only for 1 element tuples, but this is the tricky case. Today, tuples auto unpack on function call for instance :
auto t = tuple (1, 2); foo(t); // call foo(int, int)