← Back to index
|
Original Bugzilla link
Bug 18319 – std.exception: enforce example does not compile
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
Other
OS
Other
Creation time
2018-01-27T21:27:15Z
Last change time
2018-01-28T11:36:42Z
Keywords
pull
Assigned to
No Owner
Creator
Stefan
Comments
Comment #0
by kdevel — 2018-01-27T21:27:15Z
The code ``` auto f = enforce(fopen("data.txt")); auto line = readln(f); enforce(line.length, "Expected a non-empty line."); ``` from -
https://dlang.org/phobos/std_exception.html#enforce,
and -
https://dlang.org/library/std/exception/enforce.html
does not compile in any way.
https://forum.dlang.org/thread/
[email protected]
#post-mailman.2691.1517085253.9493.digitalmars-d-learn:40puremagic.com
Comment #1
by greensunny12 — 2018-01-28T02:33:15Z
PR
https://github.com/dlang/phobos/pull/6080
Comment #2
by github-bugzilla — 2018-01-28T11:36:41Z
Commits pushed to master at
https://github.com/dlang/phobos
https://github.com/dlang/phobos/commit/f4ccf68f2619f30d8fc684c6053625c13b311447
Fix Issue 18319 - std.exception: enforce example does not compile
https://github.com/dlang/phobos/commit/afa7d586dd4632fdde995d1f2f34d9dde6b6a095
Merge pull request #6080 from wilzbach/fix-18319 Fix Issue 18319 - std.exception: enforce example does not compile