News for hackers. Stuff that matters.
Re:Zero-cost futures in Rust by soulbadguy on Thursday August 11, 2016 @01:56PM (#12270343)
I though in c++ the lambda get created on the stack like any other object.
Re:Zero-cost futures in Rust by astn on Thursday August 11, 2016 @02:56PM (#12270751)
They do, but to actually use it, to pass it anywhere, you have to either wrap it in some other object (std::function, as comex pointed out) or use a template.