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?
