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

PrevUpHomeNext
string::operator<<

Serialize string to an output stream.

Synopsis

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

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

This function serializes a string as JSON into the output stream.

Return Value

Reference to os.

Complexity

Constant or linear in the size of str.

Exception Safety

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

Parameters

Name

Description

os

The output stream to serialize to.

str

The value to serialize.

Convenience header <boost/json.hpp>


PrevUpHomeNext