Types that conform to the BooleanType protocol can be used as
the condition in control statements (if, while, C-style for)
and other logical value contexts (e.g., case statement guards).
Only three types provided by Swift, Bool, DarwinBoolean, and ObjCBool,
conform to BooleanType. Expanding this set to include types that
represent more than simple boolean values is discouraged.
A type that represents a Boolean value.
Types that conform to the
BooleanType
protocol can be used as the condition in control statements (if
,while
, C-stylefor
) and other logical value contexts (e.g.,case
statement guards).Only three types provided by Swift,
Bool
,DarwinBoolean
, andObjCBool
, conform toBooleanType
. Expanding this set to include types that represent more than simple boolean values is discouraged.