compile-time checked format strings
kdevel
kdevel at vogtner.de
Sat Jan 13 19:52:39 UTC 2018
On Saturday, 13 January 2018 at 19:40:09 UTC, Adam D. Ruppe wrote:
> For ints, it catches all that, but for float, it just bails out
> of the check as soon as it actually *succeeds* - because that
> kills CTFE.
Confirmed. Thanks!
args.d
```
import std.stdio;
void main ()
{
// writefln!"%2.2d %2.2d" (1); // OK: Orphan format specifier
// writefln!"%2.2d" (1, 2); // OK: Orphan format arguments:
}
```
More information about the Digitalmars-d-learn
mailing list