Function operator<<

Synopsis

#include <include/type_safe/boolean.hpp>

template <typename Char, class CharTraits>
std::basic_ostream< Char, CharTraits > & operator<<(std::basic_ostream< Char, CharTraits > &out, const boolean &b)

Description

[ts::boolean]() output operator. \effects Converts the given [ts::boolean]() to bool and writes it to the [std::ostream](). \module types

Source

Lines 161-166 in include/type_safe/boolean.hpp. Line 149 in include/type_safe/boolean.hpp.

template <typename Char, class CharTraits>
std::basic_ostream<Char, CharTraits>& operator<<(std::basic_ostream<Char, CharTraits>& out,
                                                 const boolean&                        b)
{
    return out << static_cast<bool>(b);
}





Add Discussion as Guest

Log in