std::operator<<
The function template std::operator<< allows Single Pass Ranges and Tuple-Like objects to be inserted into standard output streams, according to the formatting options specified using boost::io::punctuate.
<boost/iostreams/format_lite.hpp>namespace std { // Note: enabled only for certain values of Insertable (see below) template<typename Ch, typename Tr, typename Insertable> std::basic_ostream<Ch, Tr>& operator<<(std::basic_ostream<Ch, Tr>& out, const Insertable& i); } // End namespace std
| Ch | - | A standard library character type |
| Tr | - | A standard library character traits type, with Tr::char_type equal to Ch |
| Insertable | - | A type modeling Insertable (see Description). |
| out | - | An output stream |
| i | - | The range or tuple-like object to be insterted into out |
Writes the given range or tuple-like object to the given output stream, using the punctuation sequence and indentation options which best match the type Insertable. (See puntuate.)
This overload of std::operator<< is enabled only for values of Insertable which satisfy the boolean metafunctions boost::io::is_single_pass_range or boost::io::is_tuple_like. Ideally, any type modelling Single Pass Range or Tuple-Like would be permitted as a template argument, but these concepts cannot be defined precisely enough in the current language to allow a suitable enabler to be defined. (See enable_if.) Therefore, we must depend on users to specialize the templates boost::io::is_range and boost::io::is_tuple_like when necessary.
[To do: provide a more detailed specification.]
Revised 20 May, 2004
© Copyright Jonathan Turkanis, 2004
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Sha'arei Tefila, an Orthodox Shul (Synagogue) in Salt Lake City, Utah Chabad Lubavitch of Utah