const->immutable array argument?

Christophe travert at phare.normalesup.org
Tue Sep 20 04:54:56 PDT 2011


bearophile , dans le message (digitalmars.D.learn:29609), a écrit :
> what's wrong in this code?
> 
> 
> void foo(const ref int[5] a) {}
> void main() {
>     immutable int[5] arr;
>     foo(arr); // Error?
> }

I don't think it is wrong. Did you try changind the order of const and 
ref, or adding parenthesis ?


More information about the Digitalmars-d-learn mailing list