Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext
static_url::has_authority

(Inherited from url_view_base)

Return true if an authority is present.

Synopsis
bool
has_authority() const;
Description

This function returns true if the url contains an authority. The presence of an authority is denoted by a double slash ("//") at the beginning or after the scheme.

Example
assert( url_view( "http://www.example.com/index.htm" ).has_authority() );
Complexity

Constant.

Exception Safety

Throws nothing.

BNF
authority       = [ userinfo "@" ] host [ ":" port ]

URI             = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

absolute-URI    = scheme ":" hier-part [ "?" query ]

URI-reference   = URI / relative-ref

relative-ref    = relative-part [ "?" query ] [ "#" fragment ]

hier-part       = "//" authority path-abempty
                ; (more...)

relative-part   = "//" authority path-abempty
                ; (more...)
Specification
See Also

authority, encoded_authority.


PrevUpHomeNext