Function Template std::operator<<

Overview
Headers
Reference
Synopsis
Template Parameters
Function Parameters
Description

Overview

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.

Headers

<boost/iostreams/format_lite.hpp>

Reference

Synopsis

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

Template Parameters

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).

Function Parameters

out- An output stream
i- The range or tuple-like object to be insterted into out

Description

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.]


Sha'arei Tefila, an Orthodox Shul (Synagogue) in Salt Lake City, Utah Chabad Lubavitch of Utah