diff --git a/std/container/dlist.d b/std/container/dlist.d index 43d0459f9f9..cdb763c2f19 100644 --- a/std/container/dlist.d +++ b/std/container/dlist.d @@ -305,6 +305,7 @@ Complexity: $(BIGOH n). { return DList(this[]); } + alias save = dup; /** Returns a range that iterates over all elements of the container, in @@ -515,6 +516,7 @@ Complexity: $(BIGOH 1). /// ditto alias stableRemoveFront = removeFront; + alias popFront = removeFront; /// ditto void removeBack() @@ -526,6 +528,7 @@ Complexity: $(BIGOH 1). /// ditto alias stableRemoveBack = removeBack; + alias popBack = removeBack; /** Removes $(D howMany) values at the front or back of the @@ -945,3 +948,12 @@ private: a.insertFront(iota(0, 5)); // can insert range with non-ref front assert(a.front == 0 && a.back == 4); } + +unittest +{ + import std.range; + // should be an input, forward and bidirectional range + assert(isInputRange!(DList!int)); + assert(isForwardRange!(DList!int)); + assert(isBidirectionalRange!(DList!int)); +} diff --git a/std/container/slist.d b/std/container/slist.d index 7d14d411634..ed8ac04f942 100644 --- a/std/container/slist.d +++ b/std/container/slist.d @@ -212,6 +212,7 @@ Complexity: $(BIGOH n). { return SList(this[]); } + alias save = dup; /** Returns a range that iterates over all elements of the container, in @@ -396,6 +397,7 @@ Complexity: $(BIGOH 1). /// ditto alias stableRemoveFront = removeFront; + alias popFront = removeFront; /** Removes $(D howMany) values at the front or back of the @@ -819,3 +821,11 @@ unittest s.reverse(); assert(s[].equal([3, 2, 1])); } + +unittest +{ + import std.range; + // should be an input and forward range + assert(isInputRange!(SList!int)); + assert(isForwardRange!(SList!int)); +} \ No newline at end of file