[#CSubNet-2constructor-02ef] = xref:CSubNet.adoc[CSubNet]::CSubNet :relfileprefix: ../ :mrdocs: Constructors == Synopses Declared in `<netaddress.h>` Construct an invalid subnet (empty, `Match()` always returns false). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CSubNet/2constructor-02e9.adoc[CSubNet](); ---- [.small]#xref:CSubNet/2constructor-02e9.adoc[_» more..._]# Construct a single‐host subnet. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:CSubNet/2constructor-0f.adoc[CSubNet](xref:CNetAddr.adoc[CNetAddr] const& addr); ---- [.small]#xref:CSubNet/2constructor-0f.adoc[_» more..._]# Construct from a given network start and number of bits (CIDR mask). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CSubNet/2constructor-07.adoc[CSubNet]( xref:CNetAddr.adoc[CNetAddr] const& addr, uint8_t mask); ---- [.small]#xref:CSubNet/2constructor-07.adoc[_» more..._]# Construct from a given network start and mask. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CSubNet/2constructor-01.adoc[CSubNet]( xref:CNetAddr.adoc[CNetAddr] const& addr, xref:CNetAddr.adoc[CNetAddr] const& mask); ---- [.small]#xref:CSubNet/2constructor-01.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *addr* [in] | The sole address to be contained in the subnet, can also be non‐IPv[46]. | *mask* [in] | CIDR mask, must be in [0, 32]for IPv4 addresses and in [0, 128]for IPv6 addresses. Otherwise an invalid subnet is created. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#