Bug 12805 – @nogc std.range.iota(FP)

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-26T12:14:43Z
Last change time
2024-12-01T16:21:15Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: phobos#10056 →

Comments

Comment #0 by bearophile_hugs — 2014-05-26T12:14:43Z
void main() @nogc { import std.range: iota; foreach (x; iota(5.0)) {} } test.d(3,21): Error: @nogc function 'D main' cannot call non-@nogc function 'std.range.iota!double.iota'
Comment #1 by jack — 2015-09-02T22:29:30Z
Comment #2 by stanislav.blinov — 2021-12-08T18:18:35Z
The pull above was cancelled due to move to refcounted exceptions (i.e. dip1008). However, even with -preview=dip1008, floating point variant of `iota` is not @nogc. Cursory look suggests it's due to it calling into std.conv.to.
Comment #3 by robert.schadek — 2024-12-01T16:21:15Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10056 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB