[Issue 6222] A problem with iota() using size_t

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 22 17:53:05 PDT 2012


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



--- Comment #2 from github-bugzilla at puremagic.com 2012-04-22 17:54:03 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/6b92abb0449e6af80f68beb9fa1311346397bfaf
fix Issue 6222 - A problem with iota() using size_t

If the common type of begin and end is unsigned and end is 0 the private
member pastEnd ends up being unsigned.max due to "pastEnd - 1" (used to make
end not inclusive) which results in iota behaving incorrectly. A simple change
to always make an empty range when begin==end prevents this.

Also fixed and clarified the documentation.

https://github.com/D-Programming-Language/phobos/commit/b1252f35afc019c37f334d274c257a25a4e0035f
Merge pull request #547 from eco/iota-unsigned-odd

fix Issue 6222 - A problem with iota() using size_t

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list