Bug 18160 – std.algorithm.iteration.each should be usable in @safe code

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2018-01-03T02:16:44Z
Last change time
2024-12-01T16:31:21Z
Assigned to
No Owner
Creator
Seb
Blocks
18110
Moved to GitHub: phobos#10277 →

Comments

Comment #0 by greensunny12 — 2018-01-03T02:16:44Z
@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 ]); }
Comment #1 by robert.schadek — 2024-12-01T16:31:21Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10277 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB