EntityRange.SliceOfR

The type used when any slice of the original input is used. If R is a string or supports slicing, then SliceOfR is the same as R; otherwise, it's the result of calling $(PHOBOS_REF takeExactly, std, range) on the input.

1 import std.algorithm : filter;
2 import std.range : takeExactly;
3 
4 static assert(is(EntityRange!(Config.init, string).SliceOfR == string));
5 
6 auto range = filter!(a => true)("some xml");
7 
8 static assert(is(EntityRange!(Config.init, typeof(range)).SliceOfR ==
9                  typeof(takeExactly(range, 42))));
struct EntityRange(Config cfg, R)
alias SliceOfR = R

Meta