[Issue 18160] New: std.algorithm.iteration.each should be usable in @safe code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 3 02:16:44 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18160
Issue ID: 18160
Summary: std.algorithm.iteration.each should be usable in @safe
code
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: greensunny12 at gmail.com
@safe unittest
{
import std.algorithm.iteration : each;
import std.range : lockstep;
auto a = [ 1, 2, 3 ];
auto b = [ 2, 3, 4 ];
a.lockstep(b).each!((ref x, ref y) { ++x; ++y; });
assert(a == [ 2, 3, 4 ]);
assert(b == [ 3, 4, 5 ]);
}
--
More information about the Digitalmars-d-bugs
mailing list