-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Labels
Description
This simple piece of code will no longer compile (tested with 1.5.1).
#include <iostream>
#include <stlab/concurrency/default_executor.hpp>
#include <stlab/concurrency/future.hpp>
int main() {
auto func = [i = int{0}]() mutable {
i++;
};
stlab::async(stlab::default_executor, [func = std::move(func)]() mutable {
func();
stlab::async(stlab::default_executor, [func = std::move(func)]() mutable {
func();
}).detach();
}).detach();
return 0;
}When I tried to upgrade to the latest version of stlab I was surprised to find that all of my wrapper functions would no longer compile. I have periodic task wrappers that function in principle like the above code.
IMHO the fallout from #260 was much larger than it needed to be as we are still trying to get back functionality like with #287
For the time being I am stuck at version 1.4.1