上一页 1 2 3 4 5 6 7 ··· 18 下一页
摘要: 带限定作用域的枚举型别通过enum class声明,非限定作用域的枚举型别通过enum声明。 1、非限定作用域的枚举型别可能导致枚举量泄漏到所在的作用域空间 namespace TestSpace { enum Color { red = 0, green, blue, }; auto red = 阅读全文
posted @ 2021-01-11 17:41 cyssmile 阅读(755) 评论(0) 推荐(1) 编辑
摘要: cudnn真的不好下,这里我下载的链接。 https://盘.摆度.抗/s/1txEtdIfRMNi07NAndONFJQ 密码: jub9 阅读全文
posted @ 2021-01-07 14:42 cyssmile 阅读(1020) 评论(0) 推荐(0) 编辑
摘要: #include <atomic> #include <functional> class ParserBase { public: virtual void Process () = 0; }; // class ParserBase class Base { public: Base(); vo 阅读全文
posted @ 2021-01-04 15:07 cyssmile 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1. value metafunction #include <assert> template<int X> struct IntIdentity { static constexpr int my_value = X; }; int main() { static_assert(42 == In 阅读全文
posted @ 2020-12-29 21:04 cyssmile 阅读(131) 评论(0) 推荐(0) 编辑
摘要: typedef struct InterruptCB { int (*callback)(void*); void *opaque; } InterruptCB; class Parse{ public: static int InterruptCallBack(void* ctx) { Parse 阅读全文
posted @ 2020-12-29 16:59 cyssmile 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 1、dirs 显示当前目录栈中的所有记录 语法 (1)格式:dirs [-clpv] [+n] [-n] (2)选项 -c 删除目录栈中的所有记录 -l 以完整格式显示 -p 一个目录一行的方式显示 -v 每行一个目录来显示目录栈的内容,每个目录前加上的编号 +N 显示从左到右的第n个目录,数字从0 阅读全文
posted @ 2020-12-29 14:48 cyssmile 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 容器创建时[]与``` #include <iostream> #include <vector> int main() { std::vector<int> vec[2]; vec[0].push_back(1); vec[1].push_back(2); //vec[0].push_back(1 阅读全文
posted @ 2020-12-24 15:55 cyssmile 阅读(432) 评论(0) 推荐(0) 编辑
摘要: auto 1、减少代码量 2、与stdfunction相比,更快。 使用auto声明functonal时,auto声明存储一个壁报变量,与该闭包是同一型别的,内存量也和该闭包是一样的。 而使用stdfunction的时候声明的是一个stdfunction的实例,不管是什么样都占用固定的尺寸的内存。如 阅读全文
posted @ 2020-12-21 17:05 cyssmile 阅读(316) 评论(0) 推荐(0) 编辑
摘要: decltype就是用于给定的名字或者表达式,decltype能告诉你该名字或表达式的型别。通常来说结果是符合自己的预期的。 const int i = 0; // decltype(i) 是 const int bool f(const Widget& w); //decltype(w) 是 co 阅读全文
posted @ 2020-12-21 15:18 cyssmile 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 前置文章 型别推导 采用auto进行变量声明时候,型别饰词取代ParamType。所以也存在三种情况: 情况1:型别饰词是指针或者引用,但不是万能引用。 情况2:型别饰词是万能引用。 情况3:型别饰词不是指针也不是引用。 int x = 27; const int cx = x; auto&& ur 阅读全文
posted @ 2020-12-15 11:37 cyssmile 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 18 下一页