Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template operator<<

boost::logic::operator<< — Writes the value of a tribool to a stream.

Synopsis

// In header: <boost/logic/tribool_io.hpp>


template<typename CharT, typename Traits> 
  std::basic_ostream< CharT, Traits > & 
  operator<<(std::basic_ostream< CharT, Traits > & out, tribool x);

Description

When the value of x is either true or false, this routine is semantically equivalent to:

 out << static_cast<bool>(x); 

When x has an indeterminate value, it outputs either the integer value 2 (if (out.flags() & std::ios_base::boolalpha) == 0) or the name of the indeterminate value. The name of the indeterminate value comes from the indeterminate_name facet (if it is defined in the output stream's locale), or from the get_default_indeterminate_name function (if it is not defined in the locale or if the C++ standard library implementation does not support locales).

Returns:

out


PrevUpHomeNext