Implicit conversion to mutable if no indirections?
Ali Çehreli
acehreli at yahoo.com
Fri Sep 2 19:19:50 UTC 2022
On 9/2/22 12:05, rikki cattermole wrote:
> struct Foo {
> char[] data;
> }
> Do you want this to error at compile time or at runtime due to writing
> to read only memory?
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.
This thread is here to remind us to test our templates for const, etc. :)
Ali
More information about the Digitalmars-d
mailing list