[#boost-urls-segments_view-2constructor] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_view.adoc[segments_view]::segments_view :relfileprefix: ../../../ :mrdocs: Constructor == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/segments_view.hpp#L62[boost/url/segments_view.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/segments_view.adoc[segments_view](/* implementation-defined */::path_ref const& ref) noexcept; ---- [.small]#xref:boost/urls/segments_view.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr xref:boost/urls/segments_view/2constructor-0c.adoc[segments_view]() = default; ---- [.small]#xref:boost/urls/segments_view/2constructor-0c.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr xref:boost/urls/segments_view/2constructor-0d.adoc[segments_view](xref:boost/urls/segments_view.adoc[segments_view] const& other) = default; ---- [.small]#xref:boost/urls/segments_view/2constructor-0d.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/segments_view/2constructor-0e.adoc[segments_view](core::string_view s); ---- [.small]#xref:boost/urls/segments_view/2constructor-0e.adoc[_» more..._]# == Description Default‐constructed segments have zero elements. === Example [,cpp] ---- segments_view ps; ---- === Effects [,cpp] ---- return segments_view( "" ); ---- === Complexity Constant. === Exception Safety Throws nothing. == Exceptions |=== | Name | Thrown on | `system_error` | `s` contains an invalid path. |=== == Parameters |=== | Name | Description | *s* | The string to parse. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#