german diago wrote:
> If subscript operator is legal as non-member function in c++0x, could
> we write?
> template <typename...Types, int N>
> auto operator(tuple<Types...> && tup, int n = N) -> constexpr
> return get<N>(tup);
> is this legal c++0x? Because if it is. We could write.
> tuple<int, float, string> mytuple;
> mytuple = 12;
Sorry, but N cannot be deduced in this way.
Furthermore, we would get functions with weird signatures,
since default values are not part of it.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]