std_exception.html#enforce: example does not compile

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat Jan 27 20:33:46 UTC 2018


On Saturday, January 27, 2018 20:11:29 kdevel via Digitalmars-d-learn wrote:
> On Saturday, 27 January 2018 at 18:34:35 UTC, Jonathan M Davis
>
> wrote:
> >> The example still does not compile.
> >
> > That has nothing to do with enforce. std.stdio.readln does not
> > take a FILE*. In general, you shouldn't mix core.stdc.stdio and
> > std.stdio.
>
> The code is from the official documentation:
>
> - https://dlang.org/phobos/std_exception.html#enforce, and
> - https://dlang.org/library/std/exception/enforce.html
>
> Shall I file a bug report?

Yes. Any time that code in the official docs doesn't compile, please report
it. In most cases, the examples in the documentation are ddoc-ed unittest
blocks, which catches such problems, but they aren't always.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list