staticlib_support  1.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Namespaces | Classes | Typedefs | Functions
staticlib::support::logic Namespace Reference

Namespaces

namespace  detail
 INTERNAL ONLY.

Classes

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.

Functions

bool indeterminate (tribool x, detail::indeterminate_t dummy=detail::indeterminate_t())
 Keyword and test function for the indeterminate tribool value.
tribool operator! (tribool x)
 Computes the logical negation of a tribool.
tribool operator&& (tribool x, tribool y)
 Computes the logical conjuction of two tribools.
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.
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.
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.
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.
tribool operator|| (tribool x, tribool y)
 Computes the logical disjunction of two tribools.
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.
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.
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.
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.
tribool operator== (tribool x, tribool y)
 Compare tribools for equality.
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.
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.
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.
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.
tribool operator!= (tribool x, tribool y)
 Compare tribools for inequality.
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.
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.
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.
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.

Typedef Documentation

typedef bool(* staticlib::support::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.

Function Documentation

bool staticlib::support::logic::indeterminate ( tribool  x,
detail::indeterminate_t  dummy = detail::indeterminate_t() 
)
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 STATICLIB_HTTPSERVER_TRIBOOL_THIRD_STATE.

Returns
x.value == tribool::indeterminate_value
Exceptions
nothrow
tribool staticlib::support::logic::operator!= ( tribool  x,
tribool  y 
)
inline

Compare tribools for inequality.

Returns
the result of comparing two tribool values for inequality, according to the following table:
!=
false
true
indeterminate
false
false
true
indeterminate
true
true
false
indeterminate
indeterminate
indeterminate
indeterminate
indeterminate
Exceptions
nothrow
tribool staticlib::support::logic::operator!= ( tribool  x,
bool  y 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

tribool staticlib::support::logic::operator!= ( bool  x,
tribool  y 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

tribool staticlib::support::logic::operator!= ( indeterminate_keyword_t  ,
tribool  x 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

tribool staticlib::support::logic::operator!= ( tribool  x,
indeterminate_keyword_t   
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

tribool staticlib::support::logic::operator== ( tribool  x,
tribool  y 
)
inline

Compare tribools for equality.

Returns
the result of comparing two tribool values, according to the following table:
==
false
true
indeterminate
false
true
false
indeterminate
true
false
true
indeterminate
indeterminate
indeterminate
indeterminate
indeterminate
Exceptions
nothrow
tribool staticlib::support::logic::operator== ( tribool  x,
bool  y 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

tribool staticlib::support::logic::operator== ( bool  x,
tribool  y 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

tribool staticlib::support::logic::operator== ( indeterminate_keyword_t  ,
tribool  x 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

tribool staticlib::support::logic::operator== ( tribool  x,
indeterminate_keyword_t   
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.