OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::tribool Class Reference

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.
 

Detailed Description

Tri-state boolean value.

See also
weakbool
indeterminate
Examples
eagine/tribool.cpp.

The documentation for this class was generated from the following file:

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).