Problem with taking inout, const references
Uranuz
neuranuz at gmail.com
Wed Mar 26 22:29:36 PDT 2014
> Type is a compile-time concept; there is no difference between
> the compiled mutable versus const versions of your inout
> function. So, there is no need for more than one compilation.
Yes. It's my mistake. For CPU there is only data (that are
sequence of bits) and comands (that are sequence of bits too).
Type is human interpretation of meaning of these bits.
> The problem is, when the foreach variable is ref, the type
> gains a const as well. Unless there is a reason for that we
> should file a bug.
So problem is in foreach operator but not in *inout* itself. I
haven't send a bug so I'm not familiar with it. How could I do it?
More information about the Digitalmars-d-learn
mailing list