Variant of std.algorithm.iteration : that filters out all elements of range that are instances of Subclass.
class X { this(int x) { this.x = x; } int x; } class Y : X { this(int x) { super(x); } } auto y = castFilter!Y([new X(42), new Y(43)]); auto yf = y.front; static assert(is(typeof(yf) == Y)); y.popFront(); assert(y.empty);
See Implementation
Variant of std.algorithm.iteration : that filters out all elements of range that are instances of Subclass.