
On 07/08/2004 03:53 PM, David B. Held wrote:
Larry Evans wrote:
[...] Do you mean like the :0: operator in
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=1072lb8ira3jg41%40corp.supernews.com [...]
I didn't totally follow your reasoning, but I think I might have a more generic solution that I will post in c.l.c++.m.
Putting it another way, there's a 1 to 1 correspondence between templates nested to a depth N, and an N argument template. IOW, this is the same as saying there's a 1 to 1 correspondence between a function curried N times and an N argument function. Hence, if you can deduce the template arguments in an N template argument function, then you can deduce the template arguments in a function with 1 argument formed from templated nested to a depth N. IOW, just as the template arguments in: template < typename A1 , typename A2 ... , typename AN
void f( T<A1,A2,...,AN>& a) ; can be deduced; so can the template arguments in: template < typename A1 , typename A2 ... , typename AN
void f( T1<A1>:0:T2<A2>:0: ... :0:TN<AN>& a) ; because there's a 1 to 1 correspondence between: T<A1,A2,...,AN> and: T1<A1>:0:T2<A2>:0: ... :0:TN<AN> Since there is such a 1 to 1 correspondence, deducing 1 should be as possible as deducing the other. At least I think so :)