cppcoro
cppcoro copied to clipboard
Having problem returning future from cppcoro::generator
cppcoro::generator<std::optional<std::futurestd::string>> object_list (std::string* input) { ... co_yield {}; ... while(...==true) { co_yield (std::async(std::launch::async, = {return HttpGetString_convertedTo_stdString(target); })) } }
int main()
{
for (auto element : object_list(a)
{
//Object_list showing error in visual studio
}
}
I am not a very good github user please forgive my formatting, I was exploring on my own and wanted to do something like this and I can't fix it
nvm, I feel like shared_future is needed for supporting this, please close the repo after reading it