[#boost-urls-segments_encoded_ref-clear]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_encoded_ref.adoc[segments&lowbar;encoded&lowbar;ref]::clear
:relfileprefix: ../../../
:mrdocs:

Clear the contents of the container

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/segments_encoded_ref.hpp#L271[boost&sol;url&sol;segments&lowbar;encoded&lowbar;ref&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
clear() noexcept;
----

== Description

All iterators are invalidated&period;

== Effects

[,cpp]
----
this->url().set_encoded_path( "" );
----
== Postconditions

[,cpp]
----
this->empty() == true
----
== Complexity

Linear in `this&hyphen;&gt;url()&period;encoded&lowbar;query()&period;size() &plus; this&hyphen;&gt;url()&period;encoded&lowbar;fragment()&period;size()`&period;

== Exception Safety

Throws nothing&period;


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