Re: Template type parameters with their own type parameters

2011-03-05 Thread spir
On 03/05/2011 04:02 AM, Peter Lundgren wrote: I have a function that I think should look something like this: MyStruct!T myFunc(T)(MyStruct!T x, ...) { ... return MyStruct!T(...); } and the closest I can get to is: T myFunc(T)(T x, ...) { ... return T(...); }

Re: Template type parameters with their own type parameters

2011-03-05 Thread Peter Lundgren
== Quote from spir (denis.s...@gmail.com)'s article On 03/05/2011 04:02 AM, Peter Lundgren wrote: I have a function that I think should look something like this: MyStruct!T myFunc(T)(MyStruct!T x, ...) { ... return MyStruct!T(...); } and the closest I can get to is: T

Template type parameters with their own type parameters

2011-03-04 Thread Peter Lundgren
I have a function that I think should look something like this: MyStruct!T myFunc(T)(MyStruct!T x, ...) { ... return MyStruct!T(...); } and the closest I can get to is: T myFunc(T)(T x, ...) { ... return T(...); } which works, but doesn't make clear the intended