Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
January 10, 2015 [Issue 13654] @nogc std.algorithm.enumerate | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13654 --- Comment #1 from bearophile_hugs@eml.cc --- A possible solution is to replace this: auto enumerate(Enumerator = size_t, Range)(Range range, Enumerator start = 0) if (isIntegral!Enumerator && isInputRange!Range) ... if (overflow || result > Enumerator.max) throw new RangeError("overflow in `start + range.length`"); } } ... With this: auto enumerate(Enumerator = size_t, Range)(Range range, Enumerator start = 0) @nogc if (isIntegral!Enumerator && isInputRange!Range) ... if (overflow || result > Enumerator.max) { static immutable err = new RangeError("overflow in `start + range.length`"); throw err; } } } ... But I don't know if immutable errors are really correct. -- |
January 10, 2015 [Issue 13654] @nogc std.range.enumerate | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13654 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|@nogc |@nogc std.range.enumerate |std.algorithm.enumerate | -- |
November 21, 2015 [Issue 13654] @nogc std.range.enumerate | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13654 bb.temp@gmx.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bb.temp@gmx.com Resolution|--- |FIXED -- |
March 21, 2020 [Issue 13654] @nogc std.range.enumerate | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13654 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|b2.temp@gmx.com | -- |
Copyright © 1999-2021 by the D Language Foundation