Const-correctness and uniqueness. Again.

via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 9 04:38:59 PST 2015


On Monday, 9 February 2015 at 11:38:23 UTC, Jakob Ovrum wrote:
> On Monday, 9 February 2015 at 11:37:23 UTC, Jakob Ovrum wrote:
>> std.array.join is strongly pure (with appropriate template 
>> arguments), so its return value is implicitly convertible to 
>> immutable.
>
> Err, implicitly convertible to *mutable*. It goes both ways.

It does? Not according to my tests. And it would be bad if it 
did, because the returned immutable value could actually reside 
in read-only memory.


More information about the Digitalmars-d mailing list