21 Internet protocol [internet]

21.12 Class template ip::network_v6 [internet.network.v6]

21.12.4 ip::network_v6 creation [internet.network.v6.creation]

constexpr network_v6 make_network_v6(const address_v6& addr, int prefix_len);

Returns: network_v6(addr, prefix_len).

network_v6 make_network_v6(const char* str); network_v6 make_network_v6(const char* str, error_code& ec) noexcept; network_v6 make_network_v6(const string& str); network_v6 make_network_v6(const string& str, error_code& ec) noexcept; network_v6 make_network_v6(string_view str); network_v6 make_network_v6(string_view str, error_code& ec) noexcept;

Returns: If str contains a value of the form address '/' prefix-length, a network_v6 object constructed with the result of applying make_address_v6() to the address portion of the string, and the result of converting prefix-length to an integer of type int. Otherwise returns network_v6() and sets ec to reflect the error.

Error conditions:

  • errc::invalid_argument — if str is not a valid textual representation of an IPv6 address and prefix length.