c++20
Silent_Blue_Sky
欢迎留言讨论
展开
-
c++ 高阶函数 numeric库
【代码】c++ 高阶函数 numeric库。原创 2022-11-15 17:51:01 · 320 阅读 · 0 评论 -
c++20 -通用打印的一般实现
main.cpp // C #ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <原创 2022-04-27 15:51:32 · 1525 阅读 · 2 评论 -
c++20系列-- concept初体验
c++ 模版编程里面,经常有这样的场景, 我们需要对类型有个限度, 即他需要支持一些列操作才行,在c++20 前为了实现这些,我们很可能会写出一些非常晦涩难懂的代码, 但是c++20 concept 将这一切都变得非常容易 本文定义了个LoopAble, 只有符合其定义的约束是时候才能通过编译, #include <iostream> #include <vector> using namespace std; // 是否支持 inplace loop for templ.原创 2022-04-22 15:25:42 · 1127 阅读 · 0 评论