Set the host to an address

Synopsis

Declared in header </boost/url/url_base.hpp#L1378[boost/url/url_base.hpp,window=blank_]>

url_base&
set_host_ipvfuture(string_view s);

Description

The host is set to the specified IPvFuture string. The host type is host_type::ipvfuture.

Example

assert( url().set_host_ipvfuture( "v42.bis" ).buffer() == "//[v42.bis]" );

Complexity

Linear in this->size() + s.size().

Postconditions

this->has_authority() == true && this->host_ipvfuture) == s && this->host_type() == host_type::ipvfuture

Exception Safety

Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.

BNF

IPvFuture     = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )

Specification

Return Value

  • ``

Parameters

Name Type

s

string_view