Bug 2203

Summary: ns-3 events based on C++11 lambdas
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: coreAssignee: Peter Barnes <pdbarnes>
Status: RESOLVED MOVED    
Severity: enhancement CC: ns-bugs
Priority: P5    
Version: unspecified   
Hardware: PC   
OS: Linux   
See Also: https://www.nsnam.org/bugzilla/show_bug.cgi?id=2457
Attachments: patch with example

Description Tom Henderson 2015-10-30 01:56:16 UTC
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 UTC
Upstream merge request on GitLab:
https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/497