...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::logic::tribool — A 3-state boolean type.
// In header: <boost/logic/tribool.hpp> class tribool { public: enum value_t; // construct/copy/destruct tribool() noexcept; tribool(bool) noexcept; tribool(indeterminate_keyword_t) noexcept; // public member functions explicit BOOST_CONSTEXPR operator bool() const noexcept; // public data members enum boost::logic::tribool::value_t value; };
3-state boolean values are either true, false, or indeterminate.
tribool
public
construct/copy/destructtribool() noexcept;
Construct a new 3-state boolean value with the value 'false'.
Throws: |
Will not throw. |
tribool(bool initial_value) noexcept;
Construct a new 3-state boolean value with the given boolean value, which may be true
or false
.
Throws: |
Will not throw. |
tribool(indeterminate_keyword_t) noexcept;
Construct a new 3-state boolean value with an indeterminate value.
Throws: |
Will not throw. |