[Issue 11466] std.range.zip for nothrow and @safe functions
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Dec 17 10:06:01 PST 2014
https://issues.dlang.org/show_bug.cgi?id=11466
--- Comment #4 from hsteoh at quickfur.ath.cx ---
Zip.empty and Zip.popFront call enforce, which is not nothrow. This can't be
eliminated because the runtime length of the ranges passed to zip() is not
known, and zip() will throw an exception if unequal-length ranges are passed to
it.
I don't know how to resolve this, since the only way to make Zip nothrow is to
change enforce to assert, but that means you'll get array bounds violations at
runtime if the input arguments have unequal lengths.
--
More information about the Digitalmars-d-bugs
mailing list