https://blog.csdn.net/weixin_41191739/article/details/113115847
vecotr<...> async 其中的一种用法:
#include <iostream> #include <vector> #include <string> #include <future> #include <algorithm> using namespace std; string flip(string s) { reverse(begin(s), end(s)); return s; } int main() { vector<future<string>> v; v.push_back(async([]{ return flip(" ,olleH"); })); v.push_back(async([]{ return flip(".gnaL"); })); v.push_back(async([]{ return flip("\n!TXEN"); })); for (auto& e : v) { cout << e.get(); } }
标签:std,总结,return,flip,back,async,include From: https://www.cnblogs.com/xiaochouk/p/17615700.html