Bug 19041 – errnoEnforce: example does not compile

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
Other
OS
Other
Creation time
2018-06-29T10:08:56Z
Last change time
2018-07-20T17:52:01Z
Assigned to
No Owner
Creator
Stefan

Comments

Comment #0 by kdevel — 2018-06-29T10:08:56Z
https://dlang.org/phobos/std_exception.html#errnoEnforce --- auto f = errnoEnforce(fopen("data.txt")); auto line = readln(f); enforce(line.length); // expect a non-empty line --- Doc needs an example which compiles. https://forum.dlang.org/thread/[email protected]
Comment #1 by github-bugzilla — 2018-07-20T17:52:01Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b4eacb009dc038175ff08844810d1bdc003ca914 Fix Issue 19041 - errnoEnforce: example does not compile https://github.com/dlang/phobos/commit/5ae015dfc9a67ffe58588d29eb8be70331c87b02 Merge pull request #6634 from wilzbach/fix-19041 Fix Issue 19041 - errnoEnforce: example does not compile