No need for version expression is a lie
Adam D Ruppe
destructionator at gmail.com
Thu Aug 24 21:25:20 UTC 2023
On Thursday, 24 August 2023 at 20:51:26 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> If the scope for which a static assert is located, does not
> contribute towards symbols that get used and another is found,
> it won't fire.
You can kinda achieve this with a zero arg template today:
void func()() {
static assert(0); // only triggered if actually called
}
I use this for a lot of things including optional dependencies
too.
> There would need to be a way to be stricter and go back to the
> way we have it now via cli.
`dmd -i main.d` would only trigger static assert failures in
modules actually imported, so that can work for a while too, then
`dmd *.d` to build all.
But none of these offer compelling advantages over `grep -r
"NotYetImplemented"`
More information about the Digitalmars-d
mailing list