:relfileprefix: ../../
[#550F303795665897E84B1835ACA60B9F00D1B235]

= Function operator<<

pass:v,q[Format the url to the output stream]


== Synopsis

Declared in header `</boost/url/url_view_base.hpp#L2778[boost/url/url_view_base.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
ostream&
operator<<(
    ostream& os,
    const xref:boost/urls/url_view_base.adoc[url_view_base]& u);
----

== Description

pass:v,q[This function serializes the url to] pass:v,q[the specified output stream. Any]
pass:v,q[percent-escapes are emitted as-is;]
pass:v,q[no decoding is performed.]

=== 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
pass:v,q[Linear in `u.buffer().size()`]

=== Exception Safety
pass:v,q[Basic guarantee.]



== Return Value

* `` 


== Parameters

|===
| Name | Type 

| *os*
| ``

| *u*
| ``

|===



