:relfileprefix: ../../../
[#boost-urls-segments_encoded_ref-clear]

= xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/segments_encoded_ref.adoc[pass:[segments_encoded_ref]]::clear


Clear the contents of the container


== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/segments_encoded_ref.hpp#L279[boost/url/segments_encoded_ref.hpp,window=blank_]>`

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

== Description




All iterators are invalidated.

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

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

=== Complexity

Linear in `this-&gt;url().encoded_query().size() + this-&gt;url().encoded_fragment().size()`.

=== Exception Safety

Throws nothing.








