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: [email protected]
          Reporter: [email protected]

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

--

Reply via email to