Allow building with GDC 10.3

This commit is contained in:
2021-05-26 10:29:03 +02:00
parent 938a1bb5b4
commit 4f48544297
10 changed files with 213 additions and 66 deletions

View File

@@ -146,7 +146,11 @@ mixin template InputRangeStub(E = int)
}
void popFront() @nogc nothrow pure @safe
in (!empty)
in
{
assert(!empty);
}
do
{
static if (!infinite)
{
@@ -157,7 +161,11 @@ mixin template InputRangeStub(E = int)
static if (withLvalueElements)
{
ref E front() @nogc nothrow pure @safe
in (!empty)
in
{
assert(!empty);
}
do
{
return *this.element;
}
@@ -165,7 +173,11 @@ mixin template InputRangeStub(E = int)
else
{
E front() @nogc nothrow pure @safe
in (!empty)
in
{
assert(!empty);
}
do
{
return E.init;
}
@@ -216,7 +228,11 @@ mixin template BidirectionalRangeStub(E = int)
mixin ForwardRangeStub!E;
void popBack() @nogc nothrow pure @safe
in (!empty)
in
{
assert(!empty);
}
do
{
static if (!infinite)
{
@@ -227,7 +243,11 @@ mixin template BidirectionalRangeStub(E = int)
static if (withLvalueElements)
{
ref E back() @nogc nothrow pure @safe
in (!empty)
in
{
assert(!empty);
}
do
{
return *this.element;
}
@@ -235,7 +255,11 @@ mixin template BidirectionalRangeStub(E = int)
else
{
E back() @nogc nothrow pure @safe
in (!empty)
in
{
assert(!empty);
}
do
{
return E.init;
}