Opened 5 years ago

Last modified 5 years ago

#13182 new Bugs

Boost.Fiber ignores lambda captures

Reported by: Sergey Babin <axilmail@…> Owned by: olli
Milestone: Boost 1.65.0 Component: context
Version: Boost 1.65.0 Severity: Problem
Keywords: Fiber Cc:

Description

In version 1.65, the following code doesn't work:

boost::fibers::fiber([p=std::make_shared<std::string>("Hi")]{

assert(p);

}).detach();

This probably because when you call std::apply(std::move(fn_), std::move( arg_)) in function "worker_context::run_", should have used "fn" and "arg" instead of "fn_" and "arg_".

Please look at "boost\fiber\context.hpp" line 428

Change History (2)

comment:1 by anonymous, 5 years ago

Summary: Boost.Fiber ignores lambda capturesBoost.Fiber ignores lambda captures??

comment:2 by anonymous, 5 years ago

Summary: Boost.Fiber ignores lambda captures??Boost.Fiber ignores lambda captures
Note: See TracTickets for help on using tickets.