摘要: 这里有一篇比较好的介绍文章,作为保留。 Understanding the C++ ABI Breakage debate 阅读全文
posted @ 2023-12-10 11:23 yangbofun 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 在实际生产环境中,遇到使用map还是unordered_map的场景。 一方面,有unordered_map需要自定义hash函数,导致构建时比较复杂。而map使用的是比较运算符来判断元素在map中的位置,std::vector有比较运算符,所以构建map比较简单。 另一方面,unordered_m 阅读全文
posted @ 2023-04-15 13:11 yangbofun 阅读(305) 评论(0) 推荐(0) 编辑
摘要: sed 使用sed来为函数统一添加宏包含 sed -i 's/dataTypeCast.;/FUNC_CALLdataTypeCast\1;/g' file 会对dataTypeCast函数添加FUNC_CALL包含。 dataTypeCast(abcd); ==> FUNC_CA 阅读全文
posted @ 2023-04-05 16:18 yangbofun 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Mojave (10.14) 之后的系统, 先创建一个文件 gdb-entitlement.xml,内容为: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "ht 阅读全文
posted @ 2023-03-21 22:31 yangbofun 阅读(60) 评论(0) 推荐(0) 编辑
摘要: github链接:https://github.com/yangbofun/Cpp2.0_new_features/tree/main/src/cpp11 C++11新增加特性 1. =default,delete =default 如果我们没有定义构造函数,C++编译器会自动为我们创建一个默认构造 阅读全文
posted @ 2023-03-19 19:55 yangbofun 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1.all_iplist文件内的所有ip的主机执行echo test ansible all -i all_iplist -m shell -a "echo test" 阅读全文
posted @ 2022-04-20 08:09 yangbofun 阅读(17) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2022.cnblogs.com/blog/1955376/202204/1955376-20220408102158875-2008281840.png) ![](https://img2022.cnblogs.com/blog/1955376/202204/1955376-20220408102236119-1586982888.png) 阅读全文
posted @ 2022-04-08 10:23 yangbofun 阅读(33) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2022.cnblogs.com/blog/1955376/202204/1955376-20220408101235104-2020934930.png) ![](https://img2022.cnblogs.com/blog/1955376/202204/1955376-20220408101305948-1296288381.png) 阅读全文
posted @ 2022-04-08 10:14 yangbofun 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1. 无符号数的编码 无符号数的编码其实就是我们平时认知的二进制表示形式,比如0b00001101=123+122+120=13 其一般定义为: 对于向量 =[x,x,...,x0]: 其转化为无符号变量后的值为 \[ B2U_w(\vec 阅读全文
posted @ 2020-11-08 20:02 yangbofun 阅读(2699) 评论(0) 推荐(0) 编辑
摘要: 在C++11中充斥着大量的enable_if, 那么enable_if是什么呢,为何要引入它呢,它有什么作用呢,,,, 在这之前,我们先了解下C++模板推导的机理。 1. 前序:C++模板推导机理 模板推导过程中,编译器会根据具体调用时的类型,来进行模板推导,并找出最适合的一个模板,注意是最适合的, 阅读全文
posted @ 2020-09-20 22:25 yangbofun 阅读(3454) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示