Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
authority_view::authority_view (2 of 3 overloads)

Construct from a string.

Synopsis
authority_view(
    core::string_view s);
Description

This function attempts to construct an authority from the string s, which must be a valid ['authority] or else an exception is thrown. Upon successful construction, the view refers to the characters in the buffer pointed to by s. Ownership is not transferred; The caller is responsible for ensuring that the lifetime of the buffer extends until the view is destroyed.

BNF
authority     = [ [link url.ref.boost__urls__authority_view.userinfo `userinfo`] "@" ] [link url.ref.boost__urls__authority_view.host `host`] [ ":" [link url.ref.boost__urls__authority_view.port `port`] ]

[link url.ref.boost__urls__authority_view.userinfo `userinfo`]      = [link url.ref.boost__urls__authority_view.user `user`] [ ":" [ [link url.ref.boost__urls__authority_view.password `password`] ] ]

[link url.ref.boost__urls__authority_view.user `user`]          = *( unreserved / pct-encoded / sub-delims )
[link url.ref.boost__urls__authority_view.password `password`]      = *( unreserved / pct-encoded / sub-delims / ":" )

[link url.ref.boost__urls__authority_view.host `host`]          = IP-literal / IPv4address / reg-[link url.ref.boost__urls__host_type `name`]

[link url.ref.boost__urls__authority_view.port `port`]          = *DIGIT
Specification
See Also

parse_authority.


PrevUpHomeNext