Hi,

In my framework I just found a dozen of compile time error handling like:

...else static assert("Invalid type");

This compiles without error. And it was useless for detecting errors because I forgot the first "false" or "0" parameter.

I think it is because of the weird case of "every string casted to bool is true".

There is an example in Phobos also: https://github.com/dlang/phobos/blob/master/std/uni/package.d
at line 8847: static assert("Unknown normalization form "~norm);

It is easy to make this mistake, but does static assert(string) has any meaningful use cases?

Reply via email to