随笔分类 - c++
摘要:插入和删除基本都是0.1us 测试10w条数据 // // // unordered_map::emplace #include <iostream> #include <string> #include <unordered_map> #include "sys/time.h" #include
阅读全文
摘要:编译期做类型检查,c++11引入, 解决c语言直接转换不安全的问题/方便找转换代码build_static_cast_1 build_static_cast
阅读全文
摘要:【参考】 https://stackoverflow.com/questions/573294/when-to-use-reinterpret-cast 1)static_cast指针转换void*保留了原地址 reinterpre_cast保证转换回来能获得原来的值 2)从int转换为float
阅读全文
摘要:参考https://www.programminghunter.com/article/30912114918/ 2次编译
阅读全文
摘要:【参考】 http://senlinzhan.github.io/2015/04/20/%E8%B0%88%E8%B0%88C-%E7%9A%84%E6%99%BA%E8%83%BD%E6%8C%87%E9%92%88/ 【解决的问题】 【调用栈】 #unique_ptr.h 1000行代码 ~un
阅读全文

浙公网安备 33010602011771号