Home Article Practice mov eax,1024

mov eax,1024

2023-10-18 18:22  views:546  source:两份牛肉    

#include <generator>
#include <numeric>
template <typename T>
std::generator<T> seq() noexcept {
for (T i = {};; ++i)
co_yield i;
}
template <typename T>
std::generator<T> take_until(std::generator<T>& g, T limit) noexcept {
for (auto&& v: g)
if (v < limit)
co_yield v;
else
break;
}
int main() {
auto s = seq<int>();
auto t = take_until(s, 45);
return std::accumulate(t.begin(), t.end(), 0) + 34;
}



Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.

字符:    改为:
去打字就可以设置个性皮肤啦!(O ^ ~ ^ O)