Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Valid C++

Name: Anonymous 2018-09-21 10:50

auto my_coroutine = [] do -> std::future<int> {
int i = ([<-]std::foo()).size();
return i [<-]std::bar();
}

Name: Anonymous 2018-09-21 12:08

Ok it's currently not valid C++ but it may be valid C++ in the future

>>3
The do is for differentiating coroutine lambdas from normal lambdas, the [<-] is like await
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1063r0.pdf

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List