4 ms·
> using std::tie, your have to know the order in which the argument are returned How is this any different than needing to know the order in which the argument
by unfamiliar 12y ago
> using std::tie, your have to know the order in which the argument are returned
How is this any different than needing to know the order in which the arguments are passes? (Which I happen think is a problem that needs solved.)
- matt42 12y agoThe slight difference is that the order of the arguments is stated in the api of the library (which does not solve the problem though). The problem may be solved by passing an iod as single argument: fun(iod(arg1_ = 1, arg2_ = "foo")); or by using method chaining : http://www.parashift.com/c++-faq-lite/named-parameter-idiom.html http://www.parashift.com/c++-faq-lite/named-parameter-idiom....