Bjarne Stroustrup's C++ Style and Technique FAQ (Reading)
Getting started How do I write this very simple program? Can you recommend a coding standard? How do I read a string from input? How do I convert an integer to a string?...
Getting started How do I write this very simple program? Can you recommend a coding standard? How do I read a string from input? How do I convert an integer to a string?...
单元测试方案对比 GoogleTest - Google Testing and Mocking Framework Quickstart: Building with Bazel Prerequisites Set up a Bazel workspace Create and run a ...
TL;DR std::shared_ptr std::shared_ptr 的存储结构 std::shared_ptr 的两种初始化方式 std::shared_ptr 的销毁方式 std::shared_ptr 的线程安全 引用计数的线程安全性 成员函数的线程安全性 托管对象的线程安全性 ...
编译基础 Translation unit Single compilation unit (编译单元) Precompiled header C preprocessor Conditional compilation Interprocedural optimization JSON Compil...
问题 Example Virtual Tables const_cast/dynamic_cast/static_cast/reinterpret_cast/std::dynamic_pointer_cast std::dynamic_pointer_cast dynamic_cast 虚继承 virtual 函数的调用开销...
示例 实现 libstdc++ vs libc++ Refer 示例 #include <cstdio> #include <string> int main() { printf("%lu\n", sizeof(std::string)); std::string s1 = "a"; std::string s2 = s...
TL;DR Introduction Getting AddressSanitizer Using AddressSanitizer Symbolizing the Reports Interaction with other tools gdb Add...
Prepare Basic 模版的定义 Explicit (full) template specialization Explicit specializations of function templates Members of specializations 全特化 偏特化 例子 ...
应用场景 分布式锁的特性 乐观锁与悲观锁 Optimistic Lock Pessimistic Lock 分布式锁方案 数据库锁 ZooKeeper Redis (SETNX/SET/DEL) 一致性问题 加锁 ...
性能调优的必要性(思考启示) 可观测性 性能基准 性能可比较 性能热点分析 性能优化案例 编译期计算 数据对齐 数字类型转换 分支预测(Branching) 系统调用优化 编译器优化 -pg 优化代码案例 ...