[#boost-urls-segments_view-2constructor]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_view.adoc[segments&lowbar;view]::segments&lowbar;view
:relfileprefix: ../../../
:mrdocs:


Constructor

== Synopsis


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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/segments_view.adoc[segments&lowbar;view](&sol;&ast; implementation-defined &ast;&sol;::path&lowbar;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&lowbar;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&lowbar;view](xref:boost/urls/segments_view.adoc[segments&lowbar;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&lowbar;view](core::string&lowbar;view s);
----

[.small]#xref:boost/urls/segments_view/2constructor-0e.adoc[_» more..._]#

== Description


Default&hyphen;constructed segments have        zero elements&period;


=== Example

[,cpp]
----
segments_view ps;
----

=== Effects

[,cpp]
----
return segments_view( "" );
----

=== Complexity

Constant&period;


=== Exception Safety

Throws nothing&period;



== Exceptions


|===
| Name | Thrown on

| `system&lowbar;error`
| `s` contains an invalid path&period;


|===

== Parameters


|===
| Name | Description

| *s*
| The string to parse&period;


|===



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