Boost :: Trigool:奇怪的行为还是错误?
题
我正在探索 boost :: trigool 并对以下行为感到惊讶。
{
using namespace boost;
boost::tribool t(indeterminate);
assert(t==indeterminate); // This assertion fails!
}
但是,如果我这样做,则断言会通过。
assert(indeterminate(t));
无论哪种情况,均无编译器警告或错误。任何人都对为什么应该这样做有很好的解释?
不隶属于 StackOverflow