Fix semantics of std::unique() to actually remove duplicates (hidden memory leak?)

This commit is contained in:
Adam Ierymenko 2015-06-29 10:21:28 -07:00
parent 3f71afd0fb
commit dbee1b38b3
9 changed files with 63 additions and 9 deletions

View file

@ -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
*/