Fix semantics of std::unique() to actually remove duplicates (hidden memory leak?)
This commit is contained in:
parent
3f71afd0fb
commit
dbee1b38b3
9 changed files with 63 additions and 9 deletions
|
@ -343,6 +343,17 @@ struct InetAddress : public sockaddr_storage
|
|||
*/
|
||||
inline void zero() throw() { memset(this,0,sizeof(InetAddress)); }
|
||||
|
||||
/**
|
||||
* Check whether this is a network/route rather than an IP assignment
|
||||
*
|
||||
* A network is an IP/netmask where everything after the netmask is
|
||||
* zero e.g. 10.0.0.0/8.
|
||||
*
|
||||
* @return True if everything after netmask bits is zero
|
||||
*/
|
||||
bool isNetwork() const
|
||||
throw();
|
||||
|
||||
/**
|
||||
* @return True if address family is non-zero
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue