mirror of
https://github.com/dlang/phobos.git
synced 2025-05-02 08:00:48 +03:00
Fixed Issue 14485: .front of empty filtered zip range is accessible
This commit is contained in:
parent
b65ebb95c4
commit
ad7dbaa050
1 changed files with 3 additions and 0 deletions
|
@ -1115,6 +1115,7 @@ private struct FilterResult(alias pred, Range)
|
||||||
|
|
||||||
@property auto ref front()
|
@property auto ref front()
|
||||||
{
|
{
|
||||||
|
assert(!empty);
|
||||||
return _input.front;
|
return _input.front;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1297,6 +1298,7 @@ private struct FilterBidiResult(alias pred, Range)
|
||||||
|
|
||||||
@property auto ref front()
|
@property auto ref front()
|
||||||
{
|
{
|
||||||
|
assert(!empty);
|
||||||
return _input.front;
|
return _input.front;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1310,6 +1312,7 @@ private struct FilterBidiResult(alias pred, Range)
|
||||||
|
|
||||||
@property auto ref back()
|
@property auto ref back()
|
||||||
{
|
{
|
||||||
|
assert(!empty);
|
||||||
return _input.back;
|
return _input.back;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue