June 29, 2018 [Issue 19041] New: errnoEnforce: example does not compile | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19041 Issue ID: 19041 Summary: errnoEnforce: example does not compile Product: D Version: D2 Hardware: Other OS: Other Status: NEW Severity: enhancement Priority: P1 Component: dlang.org Assignee: nobody@puremagic.com Reporter: kdevel@vogtner.de 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/yctbgblmfaagujoiznxt@forum.dlang.org -- |
Copyright © 1999-2021 by the D Language Foundation