New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple usage of transform & sync_wait with compile error #368
Comments
I am not an expert but, I don't know if auto cc = then(just(), [] { return 0; });
auto x = sync_wait(cc);
EXPECT_EQ(x.value(), 0); You can use |
Thanks. I thought the lambda could be implicitly packaged as a sender. I went through the unit tests and found them to be very helpful learning the patterns. |
@RishabhRD is correct. |
It might be helpful to point readers to the unit tests from the docs, better than examples for initial learning. It's been 2 days and I just realized that's where I should look first. |
I tried writing a shortest unifex example possible and came up with this
I'm curious as why sync_wait is not compiling. The error is a bit too obfiscated for someone not very familiar with unifex yet. If I return void from the second function it works fine. After inspecting transform's definition it seems to allow returning custom values.
I'm using vcpkg's version of unifex(when "then" is still "transform"), and in visual studio 2019.
Thanks.
The text was updated successfully, but these errors were encountered: