Struct TriBool

Struct Documentation

struct TriBool

Represents a boolean with three states the states are: Err (= the error/undefined state), False, True.

Public Functions

inline constexpr TriBool(bool const b) noexcept

implicit conversion from bool; maps true -> TriBool::True and false -> TriBool::False

constexpr bool operator==(TriBool const&) const noexcept = default
constexpr bool operator!=(TriBool const&) const noexcept = default
inline constexpr operator bool() const noexcept

implicit conversion to bool

Returns:

true if *this == TriBool::True; otherwise false

Public Static Attributes

static TriBool const True = {TriBool::inner_value_type::True}
static TriBool const False = {TriBool::inner_value_type::False}
static TriBool const Err = {TriBool::inner_value_type::Err}

Friends

inline friend constexpr friend TriBool operator! (TriBool const b) noexcept
inline friend constexpr friend TriBool operator&& (TriBool const l, TriBool const r) noexcept
inline friend constexpr friend TriBool operator&& (TriBool const l, bool const r) noexcept
inline friend constexpr friend TriBool operator&& (bool const l, TriBool const r) noexcept
inline friend constexpr friend TriBool operator|| (TriBool const l, TriBool const r) noexcept
inline friend constexpr friend TriBool operator|| (TriBool const l, bool const r) noexcept
inline friend constexpr friend TriBool operator|| (bool const l, TriBool const r) noexcept