Implicit conversion to mutable if no indirections?

rikki cattermole rikki at cattermole.co.nz
Fri Sep 2 19:28:08 UTC 2022


On 03/09/2022 7:19 AM, Ali Çehreli wrote:
> Fair enough but that type has an indirection. I "feel" it should work 
> for fundamental types, etc. without indirections but as I said, I 
> understand it will ruin template type deduction as well as function 
> overloading which I forgot to mention.

Yeah that's the problem isn't it, its exceptions in the type system that 
you have to add to get it to work for basic types only. For other types 
like slices, pointers, structs and classes it gets dangerous.


More information about the Digitalmars-d mailing list