What do I need to do to a struct to use it in a boolean context?

You can’t. Only Bool can be used in a boolean context.

(In principle, we could add an AbstractBool supertype of Bool and allow any AbstractBool in a boolean context, and/or add istrue/isfalse functions that you could overload.)

3 Likes