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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
url_base::has_port

(Inherited from url_view_base)

Return true if a port is present.

Synopsis
bool
has_port() const;
Description

This function returns true if an authority is present and contains a port.

Example
assert( url_view( "wss://www.example.com:443" ).has_port() );
Complexity

Constant.

Exception Safety

Throws nothing.

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

port        = *DIGIT
Specification
See Also

encoded_host_and_port, port, port_number.


PrevUpHomeNext