Validate static asserts
Andrey Zherikov
andrey.zherikov at gmail.com
Fri Sep 9 16:41:54 UTC 2022
On Friday, 9 September 2022 at 15:22:30 UTC, Ali Çehreli wrote:
> I added and removed '&& false' to every 'static assert'
> condition manually one by one. :/
It's not CI-friendly :(
> Perhaps a new compiler switch can compile every 'static assert'
> with an automatic 'false' and dump all their text to the output.
What's about new `compileOutput` trait that returns compiler
output?
```d
static assert(__traits(compileOutput, { <my code> }) ==
"message");
```
More information about the Digitalmars-d-learn
mailing list