"bearophile" <[email protected]> wrote in message 
news:[email protected]...
> Is it correct for immutable struct fields to act like enum or static const 
> fields? (I don't think so, but I am wrong often):
>

immutable struct fields can be changed inside the constructor, so they must 
be non-static.

stuct S
{
    immutable int a;
    this(int b)
    {
        a = b;
    }
} 


Reply via email to