pastebin

Paste Search Dynamic
Recent pastes
indeterminate
  1. #include <boost/logic/tribool.hpp>
  2. #include <boost/logic/tribool_io.hpp>
  3. #include <iostream>
  4.  
  5. using namespace boost::logic;
  6.  
  7. int main()
  8. {
  9.   std::cout.setf(std::ios::boolalpha);
  10.  
  11.   tribool b1 = true;
  12.   std::cout << (b1 || indeterminate) << 'n';
  13.   std::cout << (b1 && indeterminate) << 'n';
  14.  
  15.   tribool b2 = false;
  16.   std::cout << (b2 || indeterminate) << 'n';
  17.   std::cout << (b2 && indeterminate) << 'n';
  18.  
  19.   tribool b3 = indeterminate;
  20.   std::cout << (b3 || b3) << 'n';
  21.   std::cout << (b3 && b3) << 'n';
  22.  
  23.   std::cout << (not b3) << 'n';
  24. }
Parsed in 0.011 seconds