Really in need of help with std.container.array.d
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Oct 19 13:10:32 PDT 2014
On Sunday, 19 October 2014 at 19:36:46 UTC, anonymous wrote:
> On Sunday, 19 October 2014 at 19:30:40 UTC, Nordlöw wrote:
>> On Sunday, 19 October 2014 at 19:13:33 UTC, anonymous wrote:
>>> 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.
>>
>> So there's currently no complete solution to this problem yet,
>> then?
>
> The last variant works: `_outer_ = data;`.
>
> And that one is enabled in my code, while the other two are
> `version(none)`-ed away.
Used your ideas here
https://github.com/nordlow/phobos/commit/be6b5f8c4d428a9708a52757a3f31aab6878d379
but unittests now fails as
array.d(234,13): Error: mutable method
std.container.array.Array!int.Array.opAssign is not callable
using a const object
../../std/algorithm.d(2364,9): Error: cannot modify const
expression result
array.d(297,24): Error: template instance
std.algorithm.move!(const(int)) error instantiating
array.d(465,5): instantiated from here:
Range!(const(Array!int))
array.d(877,5): instantiated from here: Array!int
array.d(320,26): Error: cast(int)__dop1738.opIndex(this._a + i)
is not an lvalue
array.d(346,30): Error: None of the overloads of 'opSliceAssign'
are callable using a const object, candidates are:
array.d(533,10):
std.container.array.Array!int.Array.opSliceAssign(int value)
array.d(540,10):
std.container.array.Array!int.Array.opSliceAssign(int value,
ulong i, ulong j)
array.d(352,38): Error: None of the overloads of 'opSliceAssign'
are callable using a const object, candidates are:
array.d(533,10):
std.container.array.Array!int.Array.opSliceAssign(int value)
array.d(540,10):
std.container.array.Array!int.Array.opSliceAssign(int value,
ulong i, ulong j)
array.d(325,32): Error: mutable method
std.container.array.Array!int.Array.Range!(Array!int).Range.this
is not callable using a const object
array.d(335,32): Error: mutable method
std.container.array.Array!int.Array.Range!(Array!int).Range.this
is not callable using a const object
array.d(469,5): Error: template instance
std.container.array.Array!int.Array.Range!(Array!int) error
instantiating
array.d(877,5): instantiated from here: Array!int
../../std/typecons.d(3889,17): Error: template instance
object.destroy!(Payload) error instantiating
array.d(169,26): instantiated from here:
RefCounted!(Payload, cast(RefCountedAutoInitialize)0)
array.d(877,5): instantiated from here: Array!int
array.d(906,5): Error: static assert (!true) is false
Comint exited abnormally with code 1 at Sun Oct 19 22:06:48
More information about the Digitalmars-d-learn
mailing list