Bug 39

Summary: Add Ipv4Address operator <
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: networkAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P1    
Version: pre-release   
Hardware: PC   
OS: Linux   

Description Gustavo J. A. M. Carneiro 2007-06-19 11:44:36 UTC
Any objections about adding this?

namespace ns3 {
  bool operator < (Ipv4Address const &addrA, Ipv4Address const &addrB) {
    return (addrA.GetHostOrder () < addrB.GetHostOrder ());
  }
}

I discovered I needed it in order to store Ipv4Addresses in a std::set.
Comment 1 Mathieu Lacage 2007-06-19 11:47:39 UTC
I have to confess that I hate it but I see the use-case.

Please, commit.
Comment 2 Gustavo J. A. M. Carneiro 2007-06-19 12:00:55 UTC
Committed as rev 784.