2011/10/15 Steven Schveighoffer <[email protected]>: > I don't think the compiler will auto-convert someTemplate!(inout(V)) to e.g. > someTemplate!(const(V)). Does that work? I know that for instance, I can't > do this: > > struct S(T) > { > T * x; > } > > S!(int) ptr; > S!(const(int)) cptr = ptr; > > So I wouldn't expect the compiler to do the above translation either...
IMO, for the purpose we need covariant/contravariant template type parameter like Scala. Kenji Hara
