diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d3620c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode +.xmake +build \ No newline at end of file diff --git a/README.md b/README.md index 3e40298..78e2fd2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # VideoShows +## 如何构建? +>请先安装xmake并执行 +```bash + +xmake -v +xmake r + +``` +>即可,如果你想用xmake构建可以使用 +```bash + +xmake project -k xmake + +``` +>生成CMakeLists.txt \ No newline at end of file diff --git a/printAndRange/printAndRange.cpp b/printAndRange/printAndRange.cpp new file mode 100644 index 0000000..5c2b288 --- /dev/null +++ b/printAndRange/printAndRange.cpp @@ -0,0 +1,54 @@ +#include +#include + +template +void print(const Args&...args){ + std::stringstream ss; + ((ss< +class Range{ +private: +T _start,_end,_step; +public: + constexpr Range()=delete; + constexpr Range(const T start,const T end,const T step)noexcept:_start(start),_end(end),_step(step){} + constexpr Range(const T start,const T end)noexcept:Range(start,end,1){} + constexpr Range(const T end)noexcept:Range(1,end,1){} + + struct Iterator{ + T current,step; + constexpr Iterator()=delete; + constexpr Iterator(const T start,const T step)noexcept:current(start),step(step){} + constexpr bool operator!=(const Iterator &other)const noexcept{ + return current