:relfileprefix: ../../../
[#boost-urls-static_url-set_host_ipvfuture]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/static_url.adoc[pass:[static_url]]::set_host_ipvfuture


Set the host to an address


=== Synopsis

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/static_url.adoc[static_url]&
set_host_ipvfuture(core::string_view s);
----

=== Description


The host is set to the specified IPvFuture
string.
The host type is
xref:boost/urls/host_type/ipvfuture.adoc[host_type::ipvfuture]
.
[,cpp]
----
assert( url().set_host_ipvfuture( "v42.bis" ).buffer() == "//[v42.bis]" );
----

=== Linear in `this-&gt;size() + s.size()`.
[,cpp]
----
this->has_authority() == true && this->host_ipvfuture) == s && this->host_type() == host_type::ipvfuture
----

=== Strong guarantee.

Calls to allocate may throw.
Exceptions thrown on invalid input.
[,cpp]
----
IPvFuture     = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
----

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



=== Exceptions

|===
| Name | Thrown on

| ``s``
| 
contains an invalid percent-encoding.

|===



=== Parameters

|===
| Name | Description 

| *s*
| 
The string to set.

|===




=== See Also


xref:boost/urls/url_base/set_encoded_host.adoc[set_encoded_host]
,
xref:boost/urls/url_base/set_encoded_host_address.adoc[set_encoded_host_address]
,
xref:boost/urls/url_base/set_encoded_host_name.adoc[set_encoded_host_name]
,
xref:boost/urls/url_base/set_host.adoc[set_host]
,
xref:boost/urls/url_base/set_host_address.adoc[set_host_address]
,
xref:boost/urls/url_base/set_host_ipv4.adoc[set_host_ipv4]
,
xref:boost/urls/url_base/set_host_ipv6.adoc[set_host_ipv6]
,
xref:boost/urls/url_base/set_host_name.adoc[set_host_name]
.



