Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions std/array.d
Original file line number Diff line number Diff line change
Expand Up @@ -2361,6 +2361,7 @@ struct Appender(A : T[], T)
emplace(&it, items.front);
else
it = items.front;
items.popFront();
}
}
else
Expand All @@ -2372,6 +2373,7 @@ struct Appender(A : T[], T)
emplace(&it, getUItem(items.front));
else
it = getUItem(items.front);
items.popFront();
}
}

Expand Down Expand Up @@ -2874,6 +2876,14 @@ unittest
assert(app3.data == [1, 2, 3]);
}

unittest
{
Appender!(int[]) app;
short[] range = [1, 2, 3];
app.put(range);
assert(app.data == [1, 2, 3]);
}

/*
A simple slice type only holding pointers to the beginning and the end
of an array. Experimental duplication of the built-in slice - do not
Expand Down