Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext
operator<< (4 of 5 overloads)

Serialize an element to an output stream.

Synopsis

Defined in header <boost/json/serialize.hpp>

std::ostream&
operator<<(
    std::ostream& os,
    string const& t);
Description

This function serializes the specified element as JSON into the output stream.

Return Value

os.

Complexity

Constant or linear in the size of t.

Exception Safety

Strong guarantee. Calls to memory_resource::allocate may throw.

Parameters

Name

Description

os

The output stream to serialize to.

t

The value to serialize

Convenience header <boost/json.hpp>


PrevUpHomeNext