Namespaces | |
detail | |
INTERNAL ONLY. | |
Classes | |
class | indeterminate_name |
A locale facet specifying the name of the indeterminate value of a tribool. More... | |
class | tribool |
A 3-state boolean type. More... | |
Typedefs | |
typedef bool(* | indeterminate_keyword_t )(tribool, detail::indeterminate_t) |
INTERNAL ONLY The type of the 'indeterminate' keyword. More... | |
Functions | |
bool | indeterminate (tribool x, detail::indeterminate_t dummy=detail::indeterminate_t()) |
Keyword and test function for the indeterminate tribool value. More... | |
tribool | operator! (tribool x) |
Computes the logical negation of a tribool. More... | |
tribool | operator&& (tribool x, tribool y) |
Computes the logical conjuction of two tribools. More... | |
tribool | operator&& (tribool x, bool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator&& (bool x, tribool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator&& (indeterminate_keyword_t, tribool x) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator&& (tribool x, indeterminate_keyword_t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator|| (tribool x, tribool y) |
Computes the logical disjunction of two tribools. More... | |
tribool | operator|| (tribool x, bool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator|| (bool x, tribool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator|| (indeterminate_keyword_t, tribool x) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator|| (tribool x, indeterminate_keyword_t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator== (tribool x, tribool y) |
Compare tribools for equality. More... | |
tribool | operator== (tribool x, bool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator== (bool x, tribool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator== (indeterminate_keyword_t, tribool x) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator== (tribool x, indeterminate_keyword_t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator!= (tribool x, tribool y) |
Compare tribools for inequality. More... | |
tribool | operator!= (tribool x, bool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator!= (bool x, tribool y) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator!= (indeterminate_keyword_t, tribool x) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
tribool | operator!= (tribool x, indeterminate_keyword_t) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
template<typename T > | |
std::basic_string< T > | get_default_indeterminate_name () |
Returns a string containing the default name for the indeterminate value of a tribool with the given character type T. More... | |
template<> | |
std::basic_string< char > | get_default_indeterminate_name< char > () |
Returns the character string "indeterminate". More... | |
template<> | |
std::basic_string< wchar_t > | get_default_indeterminate_name< wchar_t > () |
Returns the wide character string L"indeterminate". More... | |
template<typename CharT , typename Traits > | |
std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &out, tribool x) |
Writes the value of a tribool to a stream. More... | |
template<typename CharT , typename Traits > | |
std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &out, bool(*)(tribool, detail::indeterminate_t)) |
Writes the indeterminate tribool value to a stream. More... | |
template<typename CharT , typename Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &in, tribool &x) |
Reads a tribool value from a stream. More... | |
typedef bool(* boost::logic::indeterminate_keyword_t)(tribool, detail::indeterminate_t) |
INTERNAL ONLY The type of the 'indeterminate' keyword.
This has the same type as the function 'indeterminate' so that we can recognize when the keyword is used.
std::basic_string<T> boost::logic::get_default_indeterminate_name | ( | ) |
Returns a string containing the default name for the indeterminate value of a tribool with the given character type T.
This routine is used by the input and output streaming operators for tribool when there is no locale support or the stream's locale does not contain the indeterminate_name facet.
|
inline |
Returns the character string "indeterminate".
|
inline |
Returns the wide character string L"indeterminate".
References boost::spirit::lex::lexertl::detail::L().
|
inline |
Keyword and test function for the indeterminate tribool value.
The indeterminate
function has a dual role. It's first role is as a unary function that tells whether the tribool value is in the "indeterminate" state. It's second role is as a keyword representing the indeterminate (just like "true" and "false" represent the true and false states). If you do not like the name "indeterminate", and would prefer to use a different name, see the macro BOOST_TRIBOOL_THIRD_STATE
.
x.value == tribool::indeterminate_value
nothrow |
References boost::logic::tribool::indeterminate_value, and boost::logic::tribool::value.
Referenced by operator!(), boost::numeric::interval_lib::compare::tribool::operator!=(), operator!=(), operator&&(), boost::numeric::interval_lib::compare::tribool::operator<(), operator<<(), boost::numeric::interval_lib::compare::tribool::operator<=(), boost::numeric::interval_lib::compare::tribool::operator==(), operator==(), boost::numeric::interval_lib::compare::tribool::operator>(), boost::numeric::interval_lib::compare::tribool::operator>=(), operator>>(), and operator||().
|
inline |
Compare tribools for inequality.
!= | |||
---|---|---|---|
nothrow |
References indeterminate(), and boost::polygon::y().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References boost::polygon::y().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References indeterminate(), and boost::flyweights::x.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References indeterminate().
|
inline |
Writes the indeterminate tribool value to a stream.
This routine outputs either the integer value 2 (if (out.flags() & std::ios_base::boolalpha) == 0
) or the name of the indeterminate value. The name of the indeterminate value comes from the indeterminate_name facet (if it is defined in the output stream's locale), or from the get_default_indeterminate_name function (if it is not defined in the locale or if the C++ standard library implementation does not support locales).
out
References indeterminate().
|
inline |
Writes the value of a tribool to a stream.
When the value of x
is either true
or false
, this routine is semantically equivalent to:
When x
has an indeterminate value, it outputs either the integer value 2 (if (out.flags() & std::ios_base::boolalpha) == 0
) or the name of the indeterminate value. The name of the indeterminate value comes from the indeterminate_name facet (if it is defined in the output stream's locale), or from the get_default_indeterminate_name function (if it is not defined in the locale or if the C++ standard library implementation does not support locales).
out
References BOOST_HAS_FACET, BOOST_USE_FACET, indeterminate(), boost::logic::indeterminate_name< CharT >::name(), boost::out, and boost::flyweights::x.
|
inline |
Compare tribools for equality.
== | |||
---|---|---|---|
nothrow |
References indeterminate(), and boost::polygon::y().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References boost::polygon::y().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References indeterminate(), and boost::flyweights::x.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References indeterminate(), and boost::flyweights::x.
|
inline |
Reads a tribool value from a stream.
When (out.flags() & std::ios_base::boolalpha) == 0
, this function reads a long
value from the input stream in
and converts that value to a tribool. If that value is 0, x
becomes false
; if it is 1, x
becomes true
; if it is 2, becomes
indetermine
; otherwise, the operation fails (and the fail bit is set on the input stream in
).
When (out.flags() & std::ios_base::boolalpha) != 0
, this function first determines the names of the false, true, and indeterminate values. The false and true names are extracted from the std::numpunct
facet of the input stream's locale (if the C++ standard library implementation supports locales), or from the default_false_name
and default_true_name
functions (if there is no locale support). The indeterminate name is extracted from the appropriate indeterminate_name
facet (if it is available in the input stream's locale), or from the get_default_indeterminate_name
function (if the C++ standard library implementation does not support locales, or the indeterminate_name
facet is not specified for this locale object). The input is then matched to each of these names, and the tribool x
is assigned the value corresponding to the longest name that matched. If no name is matched or all names are empty, the operation fails (and the fail bit is set on the input stream in
).
in
References BOOST_HAS_FACET, BOOST_USE_FACET, boost::multiprecision::backends::c, boost::asio::error::eof, boost::tuples::detail::eq(), boost::regex_constants::failbit, boost::flyweights::in, indeterminate(), boost::xpressive::matched, boost::iostreams::gzip::flags::name, and boost::program_options::value().