3-state boolean type¶
-
class
tribool¶ A 3-state boolean type. The third state represents a superposition of the
trueandfalsestates.-
constexpr
tribool() noexcept¶ Creates a new tribool, with the
falsevalue.
-
constexpr
tribool(bool v) noexcept¶ Creates a new tribool, with the given value.
Parameters: v – the value of the new tribool
-
explicit constexpr
operator bool() const noexcept¶ Returns: trueif the state is true;falseotherwise.
-
constexpr
-
constexpr tribool
operator!(tribool t) noexcept¶ Negates a tribool.
Returns: maybeif t ismaybe; otherwise!bool(t)
-
constexpr tribool
operator&&(tribool lhs, maybe_t rhs) noexcept¶ Logical conjunction of tribools.
Returns: maybeif either side ismaybe; otherwisebool(lhs) && bool(rhs)
-
constexpr tribool
operator||(tribool lhs, maybe_t rhs) noexcept¶ Logical disjunction of tribools.
Returns: trueif either side istrue; otherwisemaybeif either side ismaybe; otherwisefalse