immutable ctors, immutable members, and TDPL

Dicebot m.strashun at gmail.com
Fri May 24 01:27:15 PDT 2013


On Thursday, 23 May 2013 at 15:41:32 UTC, Steven Schveighoffer 
wrote:
> ...
> What do you think?
>
> -Steve

Honestly, I don't know. It is quite a complex question for me to 
grasp at once. Only thing I have a string feeling about is that 
those two cases should be smiliar from the point of type system 
("a" type is the same in constructed variables):

struct S1
{ int a; }

struct S2
{ immutable int a; }

// ...
auto s1 = immutable(S1)();
auto s2 = S2();


More information about the Digitalmars-d mailing list