[This question is related to but not the same as this one.]
If I try to use values of certain types as boolean expressions, I get a warning. Rather than su
All valid techniques, all will generate the same code.
Personally, I just disable the warning so I can use the cleanest syntax. Casting to a bool is not something I'm worried about doing accidentally.