sbool

shielded boolean

All comparisons and operators for sbool function identically to bool. The universal casting rules and restrictions described in Basics apply.

We recommend reading the point on conditional execution in Common mistakes prior to using sbool since it's easy to accidentally leak information with this type.

sbool a = sbool(true)
sbool b = sbool(false)

// == EXAMPLES
a && b  // false
!b  // true

Last updated