Why does this not compile?

Shachar Shemesh shachar at weka.io
Tue Mar 6 11:55:19 UTC 2018


On 06/03/18 12:16, Diego wrote:
> 
> You cannot assign a const element (`a`) to a non-const element (`b`) in 
> `S b = a` expression.

Sure you can. During assignment you are making a copy. Why do you care 
whether the original is const?

Shachar


More information about the Digitalmars-d mailing list