output of xbool

This commit is contained in:
Joachim Schöberl 2020-05-22 08:15:40 +02:00
parent 34a6777f49
commit 897cf6f848

View File

@ -30,8 +30,16 @@ namespace ngcore
bool IsTrue () const { return state == 2; } bool IsTrue () const { return state == 2; }
bool IsMaybe () const { return state == 1; } bool IsMaybe () const { return state == 1; }
bool IsFalse () const { return state == 0; } bool IsFalse () const { return state == 0; }
friend ostream & operator<< (ostream & ost, xbool xb);
}; };
static char output[] = "0?1";
inline ostream & operator<< (ostream & ost, xbool xb)
{
return ost << output[xb.state];
}
} // namespace ngcore } // namespace ngcore
#endif // NETGEN_CORE_XBOOL_HPP #endif // NETGEN_CORE_XBOOL_HPP