All Projects → downdemo → Cpp Templates 2ed

downdemo / Cpp Templates 2ed

Licence: apache-2.0
📚 C++ Templates 2ed 笔记:C++11/14/17 模板技术

C++ Templates 目前有两版,第一版于 2002 年 11 月 22 日出版,并于 2004 年出版中文版。C++11 与 C++98 相比堪称脱胎换骨,模板技术自然也顺应时代变得更为易用,但同时也增加了掌握的负担。为了顺应模板在 C++11/14/17 中的变化,第二版于 2017 年 9 月 25 日出版,暂时没有中文版,此为个人阅读英文版的笔记。

相关链接

part1:基础

  1. 函数模板(Function Template)
  2. 类模板(Class Template)
  3. 非类型模板参数(Nontype Template Parameter)
  4. 可变参数模板(Variadic Template)
  5. Tricky Basic
  6. 移动语义与 enable_if
  7. 按值传递与按引用传递(By Value or by Reference?)
  8. 编译期编程(Compile-Time Programming)
  9. 模板实战(Using Templates in Practice)
  10. 泛型库(Generic Library)

part2:深入模板

  1. 深入模板基础(Fundamentals in Depth)
  2. 模板中的名称(Names in Template)
  3. 实例化(Instantiation)
  4. 模板实参推断(Template Argument Deduction)
  5. 特化与重载(Specialization and Overloading)

part3:模板与设计

  1. Traits 的实现(Implementing Traits)
  2. 基于类型属性的重载(Overloading on Type Property)
  3. 模板与继承(Template and Inheritance)
  4. 桥接静态多态与动态多态(Bridging Static and Dynamic Polymorphism)
  5. 元编程(Metaprogramming)
  6. Typelist
  7. Tuple
  8. 标签联合(Discriminated Union)
  9. 表达式模板(Expression Template)
  10. 模板的调试(Debugging Template)

原书目录

part1:基础

  1. 函数模板
  2. 类模板
  3. 非类型模板参数
  4. 可变参数模板
  5. Tricky Basic
  6. 移动语义与 enable_if
  7. 按值传递与按引用传递
  8. 编译期编程
  9. 模板实战
  10. 模板术语
  11. 泛型库

part2:深入模板

  1. 深入模板基础
  2. 模板中的名称
  3. 实例化
  4. 模板实参推断
  5. 特化与重载
  6. 未来的方向

part3: 模板与设计

  1. 模板的多态威力
  2. Traits 的实现
  3. 基于类型属性的重载
  4. 模板与继承
  5. 桥接静态多态与动态多态
  6. 元编程
  7. Typelist
  8. Tuple
  9. 标签联合
  10. 表达式模板
  11. 模板的调试

附录

  1. 一处定义原则
  2. 值类别
  3. 重载解析
  4. 标准类型实用程序
  5. Concepts
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].