[#boost-urls-segments_ref-clear] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_ref.adoc[segments_ref]::clear :relfileprefix: ../../../ :mrdocs: Clear the contents of the container == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/segments_ref.hpp#L270[boost/url/segments_ref.hpp]>` [source,cpp,subs="verbatim,replacements,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‐>url().encoded_query().size() + this‐>url().encoded_fragment().size()`. === Exception Safety Throws nothing. [.small]#Created with https://www.mrdocs.com[MrDocs]#