[Issue 10220] `array` doesn't work with disabled default construction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 1 09:58:15 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10220



--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2013-06-01 09:58:14 PDT ---
Test case:

import std.algorithm : equal;
import std.range : repeat;
import std.array;

static struct S
{
    int val;

    @disable this();
    this(int v) { val = v; }
}
void main()
{
    auto r = S(1).repeat(2).array();
    assert(equal(r, [S(1), S(1)]));
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list