immutable array in constructor
    tsbockman via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Mar 17 04:36:26 PDT 2016
    
    
  
On Thursday, 17 March 2016 at 11:27:01 UTC, Rene Zwanenburg wrote:
> Also, if you mark the constructor as pure, new C() should be 
> implicitly convertible to an immutable C.
Ah! That's a good tip. Now I understand why I never have to say 
`new immutable(C)()` in my own code. (I am in the habit of 
marking everything I can as `pure`.)
    
    
More information about the Digitalmars-d-learn
mailing list