Giter Site home page Giter Site logo

cpp-template's Introduction

C++ Templates 中翻(第二版)

7-10月份停更

出差结束, 恢复更新

翻译这本书的契机呢, 是我在写一个软渲染引擎, 里面有一些矩阵运算, 一开始打算用eigen, 而eigen编译奇慢, 而DirectXMath又不跨平台, 想自己写个矩阵库顺便练练手, 也想玩玩编译期编程 (露出了菜狗的目光

发现我原先写的C++完全是C with Classes, 对于模板或者是元编程实在是生疏.

而这本书也买不到中文版, 于是一边写矩阵库一边看这本书, 顺便翻一下.

这本书说实话有点过于详细了, 如果对于C++模板一窍不通的话, 我认为在看过Effective Modern C++的基础上看下来是没有问题的.

24岁, 是学生, 喜欢玩王道征途

女朋友是嘤岛麻衣 !!!

是一个在二流211的二流研(班)究(儿)生(逼)

所以翻译得很慢

如果翻译有误请在issue区提出

(东西好多啊, 我英语好烂啊, 我好菜啊, 好羡慕大佬啊嘤嘤嘤)

目录及翻译进度:

关于本书

​ 读前须知

​ 本书结构

​ 如何读本书

​ 编程风格说明

​ C++11 C++14 C++17 标准

​ 示例代码与额外信息

​ 反馈

Part 1: 基础

  1. 函数模板

    √1.1 初见函数模板

    √1.2 模板实参推断

    √1.3 多模板参数

    √1.4 默认模板实参

    √1.5 重载函数模板

    √1.6 该... 还是不该?

    √1.7 总结

  2. 类模板

    √2.1 Stack类模板的实现

    √2.2 使用Stack的类模板

    √2.3 类模板的部分使用

    √2.4 友元

    √2.5 类模板的特化

    √2.6 偏特化

    √2.7 默认类模板实参

    √2.8 类型别名

    √2.9 类模板实参推断

    √2.10 模板化聚合

    √2.11 总结

  3. 非类型模板参数

    √3.1 非类型类模板参数

    √3.2 非类型函数模板参数

    √3.3 非类型模板参数的限制

    √3.4 auto非类型模板参数

    √3.5 总结

  4. 变长模板

    √4.1 变长模板

    ​ √4.1.1 举例变长模板

    ​ √4.1.2 重载变长和非变长模板

    ​ √4.1.3 sizeof ...运算符

    √4.2 折叠表达式

    √4.3 使用变长模板

    √4.4 变长雷模板和变长表达式

    ​ √4.4.1 变长表达式

    ​ √4.4.2 变长索引

    ​ √4.4.3 变长类模板

    ​ √4.4.4 变长推断指引

    ​ √4.4.5 边长基类及其使用

    √4.5 总结

  5. 基础技巧

    √5.1 typename关键字

    √5.2 零初始化

    √5.3 使用->this

    √5.4 裸数组和字符串字面量的模板.

    √5.5 成员模板

    ​ √5.5.1 .template的使用

    ​ √5.5.2 泛型lambda和成员模板

    √5.6 变量模板

    √5.7 模板模板参数

    √5.8 总结

  6. 移动语义和enable_if<>

    √(本节求求您直接去看Effective Modern C++吧)6.1 完美转发

    √6.2 特殊成员函数模板

    √6.3 使用enable_if<>来禁用类

    √6.4 使用enable_if<>

    √6.5 使用Concepts以简化enable_if<>表达式

    √6.6 总结

  7. 传值还是传引用?

    7.1 传值...

    7.2 传引用...

    ​ 7.2.1 传常引用

    ​ 7.2.2 传非常引用

    ​ 7.2.3 传通用引用

    7.3 使用 std::ref()std::cref()

    7.4 处理字符串字面量和裸数组.

    7.5 处理返回值

    7.6 建议的模板参数推导

    7.7 总结

cpp-template's People

Contributors

markovwang avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.