Bug 2257 - Ipv[4,6]InterfaceContainer::Add are not consistent
Ipv[4,6]InterfaceContainer::Add are not consistent
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3-dev
All All
: P5 trivial
Assigned To: Tommaso Pecorella
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-11 15:10 UTC by Tommaso Pecorella
Modified: 2016-01-11 15:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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