[#boost-urls-operator_lshift-0c]
= xref:boost/urls/operator_lshift-0c.adoc[boost::urls::operator&lt;&lt;]
:relfileprefix: ../../
:mrdocs:

Format the url to the output stream

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#L2783[boost&sol;url&sol;url&lowbar;view&lowbar;base&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::ostream&
operator&lt;&lt;(
    std::ostream& os,
    xref:boost/urls/url_view_base.adoc[url&lowbar;view&lowbar;base] const& u);
----

== Description

This function serializes the url to the specified output stream&period; Any percent&hyphen;escapes are emitted as&hyphen;is&semi; no decoding is performed&period;

== Example
[,cpp]
----
url_view u( "http://www.example.com/index.htm" );
std::stringstream ss;
ss << u;
assert( ss.str() == "http://www.example.com/index.htm" );
----
== Effects
[,cpp]
----
return os << u.buffer();
----
== Complexity
Linear in `u&period;buffer()&period;size()`

== Exception Safety
Basic guarantee&period;

Format the url to the output stream

This function serializes the url to the specified output stream&period; Any percent&hyphen;escapes are emitted as&hyphen;is&semi; no decoding is performed&period;

== Example
[,cpp]
----
url_view u( "http://www.example.com/index.htm" );
std::stringstream ss;
ss << u;
assert( ss.str() == "http://www.example.com/index.htm" );
----
== Effects
[,cpp]
----
return os << u.buffer();
----
== Complexity
Linear in `u&period;buffer()&period;size()`

== Exception Safety
Basic guarantee&period;

== Return Value

A reference to the output stream, for chaining

== Parameters

[cols=2]
|===
| Name
| Description
| *os*
| The output stream to write to&period;
| *u*
| The url to write&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
