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

ip::address

Implements version-independent IP addresses.

class address
Member Functions

Name

Description

address

Default constructor.

from_string

Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.

is_v4

Get whether the address is an IP version 4 address.

is_v6

Get whether the address is an IP version 6 address.

operator=

Assign from another address.

to_string

Get the address as a string in dotted decimal format.

to_v4

Get the address as an IP version 4 address.

to_v6

Get the address as an IP version 6 address.

Friends

Name

Description

operator!=

Compare two addresses for inequality.

operator<

Compare addresses for ordering.

operator==

Compare two addresses for equality.

Related Functions

Name

Description

operator<<

Output an address as a string.

The ip::address class provides the ability to use either IP version 4 or version 6 addresses.

Thread Safety

Distinct objects: Safe.

Shared objects: Unsafe.


PrevUpHomeNext