From 2038e5fe67420ce2f2f00fdafbd763d4da96f72c Mon Sep 17 00:00:00 2001 From: Changkun Ou Date: Wed, 11 Apr 2018 08:02:11 +0200 Subject: [PATCH] =?UTF-8?q?changes:=20=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- book/00-preface.md | 2 +- book/01-intro.md | 2 +- book/02-usability.md | 2 +- book/03-runtime.md | 2 ++ book/04-containers.md | 4 +++- book/05-pointers.md | 4 +++- book/06-regex.md | 4 +++- book/07-thread.md | 4 +++- book/08-filesystem.md | 2 ++ book/09-others.md | 2 ++ book/10-cpp20.md | 3 +++ book/appendix.md | 2 ++ book/toc.md | 18 +++++++++--------- 13 files changed, 35 insertions(+), 16 deletions(-) diff --git a/book/00-preface.md b/book/00-preface.md index c2929fd..0a2331b 100644 --- a/book/00-preface.md +++ b/book/00-preface.md @@ -30,7 +30,7 @@ C++17 则是近三年依赖 C++ 社区一致推进的方向,也指出了**现 本书每章中都出现了大量的代码,如果你在跟随本书介绍特性的思路编写自己的代码遇到问题时,不妨读一读随书附上的源码,你可以在[这里](../code)中找到书中介绍过的全部的源码,所有代码按章节组织,文件夹名称为章节序号。 -[返回目录](./toc.md) | 上一章 | [下一章:迈向 C++11/14/17](./01-intro.md) +[返回目录](./toc.md) | 上一章 | [下一章 迈向 C++11/14/17](./01-intro.md) ## 许可 diff --git a/book/01-intro.md b/book/01-intro.md index eef1661..d2c77a8 100644 --- a/book/01-intro.md +++ b/book/01-intro.md @@ -126,7 +126,7 @@ clean: 不必担心,本书的后续章节将为你介绍这一切。 -[返回目录](./toc.md) | [上一章](./00-preface.md) | [下一章:语言可用性强化](./02-usability.md) +[返回目录](./toc.md) | [上一章](./00-preface.md) | [下一章 语言可用性强化](./02-usability.md) ## 进一步阅读的参考文献 diff --git a/book/02-usability.md b/book/02-usability.md index 54b7a5f..bda1007 100644 --- a/book/02-usability.md +++ b/book/02-usability.md @@ -963,7 +963,7 @@ std::cout << new_enum::value3 << std::endl > 参考答案[见此](../exercises/2)。 -[返回目录](./toc.md) | [上一章](./01-intro.md) | [下一章:运行时强化](./03-runtime.md) +[返回目录](./toc.md) | [上一章](./01-intro.md) | [下一章 运行时强化](./03-runtime.md) ## 进一步阅读的参考文献 diff --git a/book/03-runtime.md b/book/03-runtime.md index f4bc48f..d9a3a1a 100644 --- a/book/03-runtime.md +++ b/book/03-runtime.md @@ -435,6 +435,8 @@ std::forward 传参:左值引用 2. 函数对象容器 std::function 3. 右值引用 +[返回目录](./toc.md) | [上一章](./02-usability.md) | [下一章 标准库:容器](./04-containers.md) + ## 许可 知识共享许可协议 diff --git a/book/04-containers.md b/book/04-containers.md index 9c4504a..9d90140 100644 --- a/book/04-containers.md +++ b/book/04-containers.md @@ -1,4 +1,4 @@ -# 第 4 章 对标准库的扩充:新增容器 +# 第 4 章 标准库:容器 > 内容修订中 @@ -247,6 +247,8 @@ for(int i = 0; i != tuple_len(new_tuple); ++i) `std::tuple` 虽然有效,但是标准库提供的功能有限,没办法满足运行期索引和迭代的需求,好在我们还有其他的方法可以自行实现。 +[返回目录](./toc.md) | [上一章](./03-runtime.md) | [下一章 标准库:指针](./05-pointers.md) + ## 许可 知识共享许可协议 diff --git a/book/05-pointers.md b/book/05-pointers.md index 4e24691..6c82834 100644 --- a/book/05-pointers.md +++ b/book/05-pointers.md @@ -1,4 +1,4 @@ -# 第 5 章 对标准库的扩充:引用计数与智能指针 +# 第 5 章 标准库:指针 > 内容修订中 @@ -176,6 +176,8 @@ int main() { 智能指针这种技术并不新奇,在很多语言中都是一种常见的技术,C++1x 将这项技术引进,在一定程度上消除了 `new`/`delete` 的滥用,是一种更加成熟的编程范式。 +[返回目录](./toc.md) | [上一章](./04-containers.md) | [下一章 标准库:正则表达式](./06-regex.md) + ## 进一步阅读的参考资料 1. [stackoverflow 上关于『C++11为什么没有 make_unique』的讨论](http://stackoverflow.com/questions/12580432/why-does-c11-have-make-shared-but-not-make-unique) diff --git a/book/06-regex.md b/book/06-regex.md index bbae63c..10bbc0c 100644 --- a/book/06-regex.md +++ b/book/06-regex.md @@ -1,4 +1,4 @@ -# 第 6 章 正则表达式库 +# 第 6 章 标准库:正则表达式 > 内容修订中 @@ -134,6 +134,8 @@ bar.txt sub-match[1]: bar > 本节提到的内容足以让我们开发编写一个简单的 Web 框架中关于URL匹配的功能,请参考习题 TODO +[返回目录](./toc.md) | [上一章](./05-pointers.md) | [下一章 标准库:线程与并发](./07-thread.md) + ## 进一步阅读的参考资料 1. [知乎『如何评价 GCC 的 C++11 正则表达式?』中原库作者 Tim Shen 的回答](http://zhihu.com/question/23070203/answer/84248248) diff --git a/book/07-thread.md b/book/07-thread.md index abbbdcb..cbdf57a 100644 --- a/book/07-thread.md +++ b/book/07-thread.md @@ -1,4 +1,4 @@ -# 第 7 章 语言级线程支持 +# 第 7 章 标准库:线程与并发 > 内容修订中 @@ -173,6 +173,8 @@ C++11 语言层提供了并发编程的相关支持,本节简单的介绍了 ` > 本节提到的内容足以让我们使用不超过 100 行代码编写一个简单的线程池库,请参考习题 TODO +[返回目录](./toc.md) | [上一章](./06-regex.md) | [下一章 标准库:文件系统](./08-filesystem.md) + ## 进一步阅读的参考资料 1. [C++ 并发编程\(中文版\)](https://www.gitbook.com/book/chenxiaowei/cpp_concurrency_in_action/details) diff --git a/book/08-filesystem.md b/book/08-filesystem.md index 12d4865..8c0dbaa 100644 --- a/book/08-filesystem.md +++ b/book/08-filesystem.md @@ -1,3 +1,5 @@ # 第 8 章 标准库: 文件系统 > TODO: 这部分内容为 C++17 新增 + +[返回目录](./toc.md) | [上一章](./07-thread.md) | [下一章 其他杂项](./09-others.md) \ No newline at end of file diff --git a/book/09-others.md b/book/09-others.md index 0e79abd..02f3d4a 100644 --- a/book/09-others.md +++ b/book/09-others.md @@ -147,6 +147,8 @@ return 0; 本节介绍的几个特性是从仍未介绍的 C++1x 新特性里使用频次较靠前的特性了,`noexcept` 是最为重要的特性,它的一个功能在于能够阻止异常的扩散传播,有效的让编译器最大限度的优化我们的代码。 +[返回目录](./toc.md) | [上一章](./08-filesystem.md) | [下一章 展望:C++20 简介](./10-cpp20.md) + ## 许可 知识共享许可协议 diff --git a/book/10-cpp20.md b/book/10-cpp20.md index 7f424e2..97565e7 100644 --- a/book/10-cpp20.md +++ b/book/10-cpp20.md @@ -126,6 +126,9 @@ Concepts TS 的发布到最后一次 C++17 的讨论会只相隔了不到四个 总的来说,类似于 Concepts/Ranges/Modules 这些令人兴奋的特性并没有入选至 C++17,这注定了 C++17 某种意义上来说相较于 C++11/14 依然只是小幅度更新,但我们有望在 C++2x 中看到这些东西的出现,这些内容对于一门已经三十多岁『高龄』的编程语言,依然是充满魅力的。 +[返回目录](./toc.md) | [上一章](./09-others.md) | [下一章 附录:进一步阅读的学习材料](./appendix.md) + + ## 进一步阅读的参考资料 1. [Final features of C++17](https://meetingcpp.com/index.php/br/items/final-features-of-c17.html) diff --git a/book/appendix.md b/book/appendix.md index a31811b..5faddcd 100644 --- a/book/appendix.md +++ b/book/appendix.md @@ -9,6 +9,8 @@ - [每位程序员都需要知道的内存知识](https://people.freebsd.org/~lstewart/articles/cpumemory.pdf) - 待补充 +[返回目录](./toc.md) | [上一章](./10-cpp20.md) | 下一章 + ## 许可 知识共享许可协议 diff --git a/book/toc.md b/book/toc.md index 86ce6ce..144ed55 100644 --- a/book/toc.md +++ b/book/toc.md @@ -9,7 +9,7 @@ + 1.1 被弃用的特性 + 1.2 与 C 的兼容性 + 进一步阅读的参考文献 -- [**第二章 语言可用性的强化**](./02-usability.md) +- [**第 2 章 语言可用性的强化**](./02-usability.md) + 2.1 常量 - nullptr - constexpr @@ -40,7 +40,7 @@ - final - 显式禁用默认函数 - 强类型枚举 -- [**第三章 语言运行期的强化**](./03-runtime.md) +- [**第 3 章 语言运行期的强化**](./03-runtime.md) + lambda 表达式 + lambda 表达式基础 + 值捕获 @@ -56,7 +56,7 @@ + 右值引用和左值引用 + 移动语义 + 完美转发 -- [**第四章 标准库: 容器**](./04-containers.md) +- [**第 4 章 标准库: 容器**](./04-containers.md) + `std::array` + `std::forward_list` + `std::unordered_set` @@ -65,12 +65,12 @@ + 基本操作 + 运行期索引 + 合并与迭代 -- [**第五章 标准库: 指针**](./05-pointers.md) +- [**第 5 章 标准库: 指针**](./05-pointers.md) + RAII 与引用计数 + `std::shared_ptr` + `std::unique_ptr` + `std::weak_ptr` -- [**第六章 标准库: 正则表达式**](./06-regex.md) +- [**第 6 章 标准库: 正则表达式**](./06-regex.md) + 正则表达式简介 + 普通字符 + 特殊字符 @@ -79,15 +79,15 @@ + `std::regex` + `std::regex_match` + `std::match_results` -- [**第七章 标准库: 线程与并发**](./07-thread.md) +- [**第 7 章 标准库: 线程与并发**](./07-thread.md) + `std::thread` + `std::mutex` + `std::unique_lock` + `std::future` + `std::packaged_task` + `std::condition_variable` -- [**第八章 标准库: 文件系统**](./08-filesystem.md) -- [**第九章 其他杂项**](./09-others.md) +- [**第 8 章 标准库: 文件系统**](./08-filesystem.md) +- [**第 9 章 其他杂项**](./09-others.md) + 新类型 + `long long int` + `noexcept` 的修饰和操作 @@ -95,7 +95,7 @@ + 原始字符串字面量 + 自定义字面量 + 数学库 -- [**第十章 展望: C++20 简介**](./10-cpp20.md) +- [**第 10 章 展望: C++20 简介**](./10-cpp20.md) + Concept + Range + Module