![]() |
Subversion
|
A three-state Boolean-like type. More...
#include <svnxx/tristate.hpp>
Public Member Functions | |
| constexpr | tristate (bool initial_value) noexcept |
| Constructor for the true and false states. | |
| constexpr | operator safe_bool () const noexcept |
Safe conversion to bool. | |
| constexpr tristate | operator! () const noexcept |
| Logical negation. | |
| constexpr | tristate (boost::tribool t) noexcept |
| Conversion from boost::tribool. | |
| constexpr | operator boost::tribool () const noexcept |
| Conversion to boost::tribool. | |
Static Public Member Functions | |
| static constexpr tristate | unknown () noexcept |
| Factory method for the unknown state. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| constexpr bool | unknown (tristate t) noexcept |
Test for the unknown tristate state. | |
| constexpr tristate | operator&& (tristate t, tristate u) noexcept |
| Logical conjunction. | |
| constexpr tristate | operator&& (tristate t, bool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator&& (bool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator&& (tristate t, boost::tribool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator&& (boost::tribool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator|| (tristate t, tristate u) noexcept |
| Logical disjunction. | |
| constexpr tristate | operator|| (tristate t, bool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator|| (bool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator|| (tristate t, boost::tribool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator|| (boost::tribool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator== (tristate t, tristate u) noexcept |
| Equality comparison. | |
| constexpr tristate | operator== (tristate t, bool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator== (bool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator== (tristate t, boost::tribool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator== (boost::tribool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator!= (tristate t, tristate u) noexcept |
| Inquality comparison. | |
| constexpr tristate | operator!= (tristate t, bool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator!= (bool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator!= (tristate t, boost::tribool b) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr tristate | operator!= (boost::tribool b, tristate t) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
A three-state Boolean-like type.
tristate values represent one of three states:
true); false); tristate constructors, methods and operators are all compile-time constant expressions and can be used to initialize other constexpr values. And unlike most other types, comparisons and logical operations between tristate values return a tristate, not a bool.
Given a tristate value t, the state it represents can be uniquely determined by the following coding pattern:
Definition at line 69 of file tristate.hpp.
|
inlineconstexprnoexcept |
Constructor for the true and false states.
Definition at line 94 of file tristate.hpp.
|
inlineconstexprnoexcept |
Conversion from boost::tribool.
tribool value equivalent to the t. SVNXX_USE_BOOST is defined. Definition at line 153 of file tristate.hpp.
|
inlineconstexprnoexcept |
Conversion to boost::tribool.
tristate value. SVNXX_USE_BOOST is defined. Definition at line 164 of file tristate.hpp.
|
inlineconstexprnoexcept |
Safe conversion to bool.
tristate is the true state. Definition at line 103 of file tristate.hpp.
|
inlineconstexprnoexcept |
Logical negation.
tristate, according to the following table: ! | |
|---|---|
Definition at line 131 of file tristate.hpp.
References unknown().
|
inlinestaticconstexprnoexcept |
Factory method for the unknown state.
Definition at line 86 of file tristate.hpp.
Referenced by operator!(), operator!=(), operator&&(), apache::subversion::svnxx::revision::operator<(), operator==(), apache::subversion::svnxx::revision::operator>(), and operator||().
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 470 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 491 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 461 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 481 of file tristate.hpp.
|
Inquality comparison.
tristate values for inequality, according to the following table: != | |||
|---|---|---|---|
Definition at line 451 of file tristate.hpp.
References unknown().
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 235 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 256 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 226 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 246 of file tristate.hpp.
|
Logical conjunction.
AND of two tristate values, according to the following table: && | |||
|---|---|---|---|
Definition at line 215 of file tristate.hpp.
References unknown().
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 392 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 413 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 383 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 403 of file tristate.hpp.
|
Equality comparison.
tristate values for equality, according to the following table: == | |||
|---|---|---|---|
Definition at line 373 of file tristate.hpp.
References unknown().
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 314 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 335 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 305 of file tristate.hpp.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SVNXX_USE_BOOST is defined. Definition at line 325 of file tristate.hpp.
|
Logical disjunction.
OR of two tristate values, according to the following table: || | |||
|---|---|---|---|
Definition at line 294 of file tristate.hpp.
References unknown().
|
Test for the unknown tristate state.
true only if t is the unknown state. Definition at line 178 of file tristate.hpp.