:relfileprefix: ../../../
[#boost-urls-ipv6_address-2constructor-00]

= xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/ipv6_address.adoc[pass:[ipv6_address]]::ipv6_address


Construct from a string.


== Synopsis

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
ipv6_address(core::string_view s);
----

== Description


This function constructs an address from
the string `s`, which must contain a valid
IPv6 address string or else an exception
is thrown.
[NOTE]

For a non-throwing parse function,
use
xref:boost/urls/parse_ipv6_address.adoc[parse_ipv6_address]
.

=== Exception Safety

Exceptions thrown on invalid input.

=== Specification

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2[3.2.2. Host (rfc3986)]



== Exceptions

|===
| Name | Thrown on

| `system_error`
| 
The input failed to parse correctly.

|===



== Parameters

|===
| Name | Description 

| *s*
| 
The string to parse.

|===




== See Also


xref:boost/urls/parse_ipv6_address.adoc[parse_ipv6_address]
.



