[Issue 18319] New: std.exception: enforce example does not compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 27 21:27:15 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18319

          Issue ID: 18319
           Summary: std.exception: enforce example does not compile
           Product: D
           Version: D2
          Hardware: Other
                OS: Other
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody at puremagic.com
          Reporter: kdevel at vogtner.de

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/ijtvcytskeswqtmlfirg@forum.dlang.org#post-mailman.2691.1517085253.9493.digitalmars-d-learn:40puremagic.com

--


More information about the Digitalmars-d-bugs mailing list