Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template operator<<

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

Synopsis

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

Copyright © 2002-2004 Douglas Gregor

PrevUpHomeNext