Tri-state boolean value. More...
#include <eagine/tribool.hpp>
Public Member Functions | |
constexpr | tribool () noexcept=default |
Default constructor. | |
constexpr | tribool (bool value) noexcept |
Constructions from boolean value. | |
constexpr | tribool (indeterminate_t) noexcept |
Constructions from indeterminate value. | |
constexpr | tribool (bool value, bool is_unknown) noexcept |
Construction with separate true/false, known/unknown arguments. | |
constexpr | operator bool () const noexcept |
Returns true, if the stored value is true. | |
constexpr auto | operator! () const noexcept |
Returns true, if the stored value is false. | |
constexpr auto | operator* () const noexcept -> bool |
Returns true, if the stored value is indeterminate. | |
constexpr auto | operator~ () const noexcept -> weakbool |
Converts this value to weakbool . | |
constexpr auto | is (bool value) const noexcept -> bool |
Returns true if the stored value is known and equal to value . | |
constexpr auto | is (indeterminate_t) const noexcept -> bool |
Returns true if the stored value is indeterminate. | |
Friends | |
constexpr friend auto | operator== (tribool a, tribool b) noexcept -> tribool |
Equality comparison. | |
constexpr friend auto | operator!= (tribool a, tribool b) noexcept -> tribool |
Non-equality comparison. | |