:relfileprefix: ../../../../
[#boost-urls-grammar-string_view_base-2conversion-06]

= xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/grammar.adoc[pass:[grammar]]::xref:boost/urls/grammar/string_view_base.adoc[pass:[string_view_base]]::operator std::string


Conversion


== Synopsis

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
explicit
operator xref:std.adoc[std]::string() const noexcept;
----

== Description


Conversion to std::string is explicit
because assigning to string using an
implicit constructor does not preserve
capacity.








