Detailed Description
A type is ConvertibleToBool if it can be implicitly converted to a boolean
value.
- Refinement Of:
- Associated Types:
- Notation:
X | A type that is a model of ConvertibleToBool |
x | Object of type X |
b | Object of type bool |
- Definitions:
- Valid Expressions:
Name | Expression | Type requirements | Return type |
ConvertibleToBool | bool b = x; | | bool |
ConvertibleToBool | if (x)
-or-
if (!x) | | |
- Expression Semantics:
Name | Expression | Precondition | Semantics | Postcondition |
ConvertibleToBool | bool b = x; | | | |
ConvertibleToBool | if (x)
-or-
if (!x) | | | |
- Complexity Guarantees:
- Invariants:
- Type(s) Modeling this Concept:
-
- Notes:
- See Also: