Fixed Issue 14485: .front of empty filtered zip range is accessible

This commit is contained in:
Jack Stouffer 2016-06-28 09:48:56 -04:00
parent b65ebb95c4
commit ad7dbaa050

View file

@ -1115,6 +1115,7 @@ private struct FilterResult(alias pred, Range)
@property auto ref front()
{
assert(!empty);
return _input.front;
}
@ -1297,6 +1298,7 @@ private struct FilterBidiResult(alias pred, Range)
@property auto ref front()
{
assert(!empty);
return _input.front;
}
@ -1310,6 +1312,7 @@ private struct FilterBidiResult(alias pred, Range)
@property auto ref back()
{
assert(!empty);
return _input.back;
}