I understand that you may be wanting a runtime error, but I'd suggest disallowing that entirely and go with a template parameter to provide your format to make sure its seeable to the compiler.
Re: Compile time format string check
Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn Sun, 22 Mar 2026 15:51:46 -0700
If its a string literal it is already handled as part of bindings:
https://dlang.org/spec/pragma.html#printf
- Compile time for... Ada via Digitalmars-d-learn
- Re: Compile... Ada via Digitalmars-d-learn
- Re: Compile... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
