No need for version expression is a lie
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Thu Aug 24 20:51:26 UTC 2023
There is an alternative solution which would be much simpler.
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.
I.e.
```d
void func() {
static assert(false);
}
```
As long as you don't call func, it won't fire.
Same goes for:
```d
module binding.b;
version(Windows) {
extern export void func();
} else {
static assert(0, "Unimplemented");
}
module binding.a;
void func() {
}
```
There would need to be a way to be stricter and go back to the way we
have it now via cli. But as far as making porting easier? Yeah it can't
be beat.
More information about the Digitalmars-d
mailing list