gamefunc / py_range_gen_simple_cpp23

c++ 23 std::ranges impl python3 for i in range(n) gen co_yield example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

py_range_gen_simple_cpp23

c++ 23 std::ranges impl python3 for i in range(n) co_yield gen example

Author: gamefunc:

website: https://www.gamefunc.top:9029
github: https://github.com/gamefunc
qq: 32686647
weixin: gamefunc
mail: fevefun@hotmail.com  

Example codes:

for(auto i : range(10)){
    std::cout << i << ", ";
}// for(auto i : range(10));

std::cout << "\n\n";

for(auto i : range(10, 1, -3)){
    std::cout << i << ", ";
}// for(auto i : range(10, 1, -3));

return 0;

image

License:

MIT; free to use and modify, but need keep the above information.

About

c++ 23 std::ranges impl python3 for i in range(n) gen co_yield example

License:MIT License


Languages

Language:C++ 100.0%