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 a snapshot of the master branch, built from commit e70692e4d8.
PrevUpHomeNext
url_view_base::operator<<

Format the URL to the output stream.

Synopsis

Defined in header <boost/url/url_view_base.hpp>

friend std::ostream&
operator<<(
    std::ostream& os,
    url_view_base const& u);
Description

This function serializes the URL to the specified output stream. Any percent-escapes are emitted as-is; no decoding is performed.

Example
url_view u( "http://www.example.com/index.htm" );
std::stringstream ss;
ss << u;
assert( ss.str() == "http://www.example.com/index.htm" );
Effects
return os << u.buffer();
Complexity

Linear in u.buffer().size()

Exception Safety

Basic guarantee.

Return Value

A reference to the output stream, for chaining

Parameters

Name

Description

os

The output stream to write to.

u

The URL to write.

Convenience header <boost/url.hpp>


PrevUpHomeNext