|
Bugzilla – Full Text Bug Listing |
| Summary: | Comparing one Address to another is a PITA | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | network | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
looks good to me. Feel free to apply. |
Because of this: bool operator == (const Address &a, const Address &b) { NS_ASSERT (a.m_type == b.m_type || a.m_type == 0 || b.m_type == 0); NS_ASSERT (a.GetLength() == b.GetLength()); return memcmp (a.m_data, b.m_data, a.m_len) == 0; } If I try to compare addresses of different types, NS-3 aborts. Why? Addresses of different types should just compare not equal, nothing more. Especially since there is no method to get the type of a generic Address...