Bug 2257

Summary: Ipv[4,6]InterfaceContainer::Add are not consistent
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: internetAssignee: Tommaso Pecorella <tommaso.pecorella>
Status: RESOLVED FIXED    
Severity: trivial CC: ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Tommaso Pecorella 2016-01-11 15:10:10 UTC
The following functions are not consistent:
Ipv6InterfaceContainer::Add (Ipv6InterfaceContainer& c)
Ipv4InterfaceContainer::Add (Ipv4InterfaceContainer c)

I.e., one works with a reference, the other by copy.
Moreover, the v6 one raises a compilation error for code like:
 interfaceContainer.Add (ipv6.Assign (someDevices));
which should be legal.

Both functions signature should be changed to be const reference.
Comment 1 Tommaso Pecorella 2016-01-11 15:33:02 UTC
Fixed in changeset:   11814:862a2e5c95ff