Bug 2203 - ns-3 events based on C++11 lambdas
ns-3 events based on C++11 lambdas
Status: RESOLVED MOVED
Product: ns-3
Classification: Unclassified
Component: core
unspecified
PC Linux
: P5 enhancement
Assigned To: Peter Barnes
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-30 01:56 EDT by Tom Henderson
Modified: 2020-12-17 20:22 EST (History)
1 user (show)

See Also:


Attachments
patch with example (2.01 KB, patch)
2015-10-30 01:56 EDT, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2015-10-30 01:56:16 EDT
Created attachment 2167 [details]
patch with example

Suggested by Craig Dowell on the developers list:
http://mailman.isi.edu/pipermail/ns-developers/2015-October/013238.html

Attached patch includes the suggested make-functional-event.h and also a patch to sample-simulator.cc to provide an example usage.

I tested the patch on gcc-4.8 and it worked when I enabled CXXFLAGS=-std=c++11

I tested the patch on gcc-4.4.7 and it did not work even with -std=c++0x; gcc only supports this with gcc-4.5 and after.

So I think we would be ready for this in the core once we no longer support gcc-4.4.7 (which is used in RHEL 6 and CentOS 6; such servers are still around).
Comment 1 Peter Barnes 2020-12-17 18:37:49 EST
Upstream merge request on GitLab:
https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/497