What I HAD TO do to get it to compile:

programResultsQ = heapify!(compareResults, Array!(Results!(O,I)))(Array!(Results!(O,I))([Results!(O,I)()]), 1);
programResultsQ.popFront();

What running it says:

AssertionFailure at line 381 of std.container.array.d, which looks like:

/**
Constructor taking a number of items
     */
    this(U)(U[] values...) if (isImplicitlyConvertible!(U, T))
    {
        import std.conv : emplace;
        auto p = cast(T*) malloc(T.sizeof * values.length);
        static if (hasIndirections!T)
        {
            if (p)
                GC.addRange(p, T.sizeof * values.length);
        }

        foreach (i, e; values)
        {
            emplace(p + i, e);
            assert(p[i] == e);     /* THIS IS LINE 381 */
        }
        _data = Data(p[0 .. values.length]);
    }

Any ideas. How can I improve this declaration? Using Phobos sometimes is such a mystery.


Reply via email to