fix Issue 7944 - std.range.iota.popFront() cycles when the range is empty #545

Merged
merged 2 commits into from Apr 23, 2012

Projects

None yet

3 participants

@eco
D Programming Language member

Added !empty assertions to front, popFront, back, and popBack to the integer iota like some other ranges do to catch popping an empty range. Also added the !empty assert to floating point iota front() which was the only one of those four that was missing.

http://d.puremagic.com/issues/show_bug.cgi?id=7944

@eco eco fix Issue 7944 - std.range.iota.popFront() cycles when the range is e…
…mpty

Added !empty assertions to front, popFront, back, and popBack to the integer
iota like some other ranges do. Also added the one that was missing to the
floating point iota.
028699f
@schveiguy
D Programming Language member

Should we add asserts in opIndex?

@eco
D Programming Language member

Makes sense. I'll take a look.

@dsimcha dsimcha merged commit 9233d3d into dlang:master Apr 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment