Really in need of help with std.container.array.d

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Oct 19 12:13:32 PDT 2014


On Sunday, 19 October 2014 at 18:58:50 UTC, Nordlöw wrote:
> On Sunday, 19 October 2014 at 15:21:02 UTC, anonymous wrote:
>>             version(none) _outer = data; /* "Error: mutable 
>> method
>>                 [...].Array.opAssign is not callable using a
>> const object" */
>
> What do these comments containing Error messages mean? Doesn't 
> this code compile?

Yes, they don't compile. It's three slightly different versions
of initializing _outer.

The first one, `_outer = data;`, is the original one. It's
understandable that it doesn't work anymore with the workaround
in place.

I don't know why the second one, `_outer_[0] = data;`, doesn't
work. Maybe it triggers the same (or a related) postblit compiler
bug again. It's essentially the same as the third one, `_outer_ =
data;`, which happens to work.


More information about the Digitalmars-d-learn mailing list