1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/TriBool.h
12 #ifndef ZYPP_TRIBOOL_H
13 #define ZYPP_TRIBOOL_H
16 #include <boost/logic/tribool.hpp>
18 ///////////////////////////////////////////////////////////////////
20 { /////////////////////////////////////////////////////////////////
22 /** 3-state boolean logic (\c true, \c false and \c indeterminate).
26 * typedef boost::logic::tribool TriBool;
27 * using boost::logic::tribool;
28 * using boost::logic::indeterminate;
32 * \warning Be carefull.esp. when comparing \ref TriBool using
33 * \c operator==, as <b><tt>( indeterminate == indeterminate )</tt></b>
34 * does \b not evaluate \b true. It's \c indeterminate.
36 * \see http://www.boost.org/doc/html/tribool.html
39 typedef boost::logic::tribool TriBool;
40 using boost::logic::tribool;
41 using boost::logic::indeterminate;
43 /////////////////////////////////////////////////////////////////
45 ///////////////////////////////////////////////////////////////////
50 /** \relates TriBool stream output */
51 inline std::ostream & operator<<(std::ostream & s, const tribool & obj)
53 if (indeterminate(obj))
63 #endif // ZYPP_TRIBOOL_H