Function operator>>

Synopsis

#include <include/type_safe/boolean.hpp>

template <typename Char, class CharTraits>
std::basic_istream< Char, CharTraits > & operator>>(std::basic_istream< Char, CharTraits > &in, boolean &b)

Description

[ts::boolean]() input operator. \effects Reads a bool from the [std::istream]() and assigns it to the given [ts::boolean](). \output_section Input/output \module types

Source

Lines 148-156 in include/type_safe/boolean.hpp.

template <typename Char, class CharTraits>
std::basic_istream<Char, CharTraits>& operator>>(std::basic_istream<Char, CharTraits>& in,
                                                 boolean&                              b)
{
    bool val;
    in >> val;
    b = val;
    return in;
}





Add Discussion as Guest

Log in