Skip to content

Commit 7ce3aa2

Browse files
authored
add: contributing guidelines & Typo fix (changkun#60)
* fix: typo * update: pdf builds & website builds * update: contributing guidelines
1 parent ee0a266 commit 7ce3aa2

File tree

14 files changed

+217
-19
lines changed

14 files changed

+217
-19
lines changed

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: 报告错误
4+
5+
---
6+
7+
## 实际描述
8+
9+
- 文件路径:例如,book/zh-cn/02-usability.md
10+
- 原文段落:
11+
12+
```
13+
复制原文段落
14+
```
15+
16+
## 预期描述
17+
18+
```
19+
修改后的段落
20+
```
21+
22+
## 附图
23+
24+
必要时,请附上相关截图
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Feature request
3+
about: 内容建议
4+
5+
---
6+
7+
## 动机
8+
9+
请描述你提交内容建议的动机。
10+
11+
## 需求说明
12+
13+
请描述你提交内容建议的详单,例如具体是增加哪个知识点的说明。

.github/ISSUE_TEMPLATE/Question.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Question
3+
about: 提交问题
4+
5+
---
6+
7+
## 问题描述
8+
9+
请在此描述你的问题,提问前请参考[提问的智慧](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
resolve #issue_id
2+
3+
## 说明
4+
5+
此处详细说明 PR 的动机是什么、解决了什么样的问题。
6+
7+
## 变化箱单
8+
9+
- 修复了 XXX 的 typo 错误
10+
- 增加了 XXX 相关的说明
11+
- 解决了关于 XXX 的描述性错误
12+
13+
## 参考文献
14+
15+
如果有请注明

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# 如何参与贡献
2+
3+
[![](https://img.shields.io/badge/chat-%E4%BA%A4%E6%B5%81-667ed5.svg)](./assets/community.md)
4+
5+
## 提交 Issue
6+
7+
『C++ 11/14/17』的 issue 用于追踪书中存在的原则性的描述错误、存在的 `typo` 错误,以及向本书作者提问等。
8+
9+
- 通常情况下,你可能会发现书中某个段落存在错别字、语义错误、文法错误等。
10+
这都是 `typo` 错误。如果该错误已经对你的阅读造成了一定障碍,
11+
你也强烈的认为该 `typo` 也会影响到其他人的阅读,
12+
那么非常欢迎[提交 issue](https://github.com/changkun/modern-cpp-tutorial/issues)
13+
来报告 `typo` 错误。
14+
15+
- 对于书中存在的原则性错误,例如对源码进行分析的内容产生明显的错误、
16+
且内容对其他人会产生严重的误导,请不要犹豫,
17+
立即[提交 issue](https://github.com/changkun/modern-cpp-tutorial/issues) 来报告此错误,以免继续传播错误的知识。
18+
如果可以,也请附上相关改进说明。通常情况下,如果存在这类问题,我们鼓励你一并提交改进 PR。
19+
20+
- 如果你在阅读本书的时候发现有部分内容难于理解,也欢迎[提交 issue](https://github.com/changkun/modern-cpp-tutorial/issues) 来询问作者表达你的疑惑。
21+
作者会根据实际情况重新优化这一部分的内容,进而帮助他人更易阅读这部分的内容。
22+
23+
- 我们也欢迎你提交针对本书内容的相关建议,具体来说如果你认为书中未涉及的某个模块或者文件的源码值得讨论,也欢迎 [提交 issue](https://github.com/changkun/go-under-the-hood/issues) 来进一步讨论。
24+
25+
## 提交 Pull request
26+
27+
『C++ 11/14/17』是一本开源书籍,任何人都可以参与贡献自己 PR。但在提交 PR 之前请仔细阅读下面的说明:
28+
29+
- 当你认为需要提交一个 PR 时,请确保 [issue 列表](https://github.com/changkun/modern-cpp-tutorial/issues)中,已经包含了你想要解决的问题。
30+
如果没有,请参考**提交 Issue** 一节中的描述,提交你的 issue,再提交你的 PR。
31+
32+
- 当你准备提交一个 typo 错误的 PR 时,请确保你的 PR 改进了 **超过 50 个汉字(或英文单词)**`typo` 错误,否则请不要提交 PR。
33+
- 对于一个修复原则性错误的 PR,请不要犹豫,笔者对此表示非常感谢!
34+
- 如果非常喜欢本书,以至于希望参与本书的合著,成为作者,请发邮件询问:`hi at changkun dot us`
35+
36+
本仓库提供了多种阅读方式,如果你提交一个 Pull request,则请确保你检查的如下的 checklist:
37+
38+
- [ ] 只改动原书正文 `book` 下的部分内容,不涉及代码片段的修改,则无需进行修改
39+
- [ ] 如果同时还改动了正文中的代码片段,则需要同步 `code` 文件夹下对应的代码片段
40+
- [ ] 如果改动还涉及习题的设计,则需要同步 `exercises` 文件夹下的内容

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
# 《高速上手 C++11/14/17》
44

5-
![](https://img.shields.io/badge/version-v2-green.svg)
65
[![](https://img.shields.io/badge/language-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-red.svg)](./README.md) [![](https://img.shields.io/badge/language-English-blue.svg)](./README-en-us.md)
76
[![](https://img.shields.io/badge/%C2%A5-%E8%B5%9E%E5%8A%A9-ff69b4.svg)](./assets/donate.md)
8-
[![](https://img.shields.io/badge/chat-%E4%BA%A4%E6%B5%81-667ed5.svg)](./assets/community.md)
97

108
## 本书目的
119

@@ -42,7 +40,7 @@
4240

4341
## 致谢
4442

45-
笔者时间和水平有限,如果读者发现书中内容的错误,欢迎提 [Issue](https://github.com/changkun/modern-cpp-tutorial/issues),或者直接提 [Pull request](https://github.com/changkun/modern-cpp-tutorial/pulls)。由衷感谢每一位指出本书中出现错误的读者,包括但不限于 [Contributors](https://github.com/changkun/modern-cpp-tutorial/graphs/contributors)
43+
笔者时间和水平有限,如果读者发现书中内容的错误,欢迎提 [Issue](https://github.com/changkun/modern-cpp-tutorial/issues),或者直接提 [Pull request](https://github.com/changkun/modern-cpp-tutorial/pulls)详细贡献指南请参考[如何参与贡献](CONTRIBUTING.md)由衷感谢每一位指出本书中出现错误的读者,包括但不限于 [Contributors](https://github.com/changkun/modern-cpp-tutorial/graphs/contributors)
4644

4745
## 许可
4846

book/zh-cn/05-pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main()
4747
}
4848
```
4949
50-
`std::shared_ptr` 可以通过 `get()` 方法来获取原始指针,通过 `reset()` 来减少一个引用计数,并通过`get_count()`来查看一个对象的引用计数。例如:
50+
`std::shared_ptr` 可以通过 `get()` 方法来获取原始指针,通过 `reset()` 来减少一个引用计数,并通过`use_count()`来查看一个对象的引用计数。例如:
5151
5252
```cpp
5353
auto pointer = std::make_shared<int>(10);

pdf/en-us/modern-cpp-tutorial.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "C++11/14/17 On the Fly"
3+
author: Changkun Ou <hi@changkun.us>
4+
copyright: cc-by-nc-nd 4.0
5+
---

pdf/en-us/toc.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# C++ 11/14/17 On The Fly
2+
3+
> This book adapting to C++17 and translating to English
4+
5+
## Table of Contents
6+
7+
- [**Preface**](./00-preface.md)
8+
- [**Chapter 01 Towards C++11/14/17**](./01-intro.md)
9+
+ 1.1 Deprecated Features
10+
+ 1.2 Compatibility with C
11+
+ Further Readings
12+
- [**Chapter 02 Language Usability Enhancements**](./02-usability.md)
13+
+ 2.1 Constants
14+
- nullptr
15+
- constexpr
16+
+ 2.2 Variables & Initialization
17+
- Conditional Statement
18+
- Initializer List
19+
- Structured binding
20+
+ 2.3 Type Deduction
21+
- auto
22+
- decltype
23+
- Tail return type
24+
- decltype(auto)
25+
+ 2.4 Control Flow
26+
- if constexpr
27+
- Range-based for loop
28+
+ 2.5 Templates
29+
- External templates
30+
- The ">"
31+
- Type alias templates
32+
- Default template parameters
33+
- Variadic templates
34+
- Fold expression
35+
+ 2.6 Object-oriented
36+
- Delegate constructor
37+
- Inheritance constructor
38+
- Explicit virtual function overwrite
39+
- override
40+
- final
41+
- Explicit delete default function
42+
- Strongly typed enumerations
43+
- [**Chapter 03 Language Runtime Enhancements**](./03-runtime.md)
44+
+ Lambda expression
45+
+ Basics
46+
+ Value capture
47+
+ Reference capture
48+
+ Implicit capture
49+
+ Expression capture
50+
+ Generic lambda
51+
+ Function object wrapper
52+
+ std::function
53+
+ std::bind/std::placeholder
54+
+ rvalue reference
55+
+ lvalue, rvalue, prvalue, xvalue
56+
+ rvalue reference & lvalue reference
57+
+ Move semantics
58+
+ Perfect forwarding
59+
- [**Chapter 04 Sandard Library: Containers**](./04-containers.md)
60+
+ `std::array`
61+
+ `std::forward_list`
62+
+ `std::unordered_set`
63+
+ `std::unordered_map`
64+
+ `std::tuple`
65+
+ basic operation
66+
+ runtime indexing
67+
+ merge and iteration
68+
- [**Chapter 05 Sandard Library: Pointers**](./05-pointers.md)
69+
+ RAII and reference counting
70+
+ `std::shared_ptr`
71+
+ `std::unique_ptr`
72+
+ `std::weak_ptr`
73+
- [**Chapter 06 Sandard Library: Regular Expression**](./06-regex.md)
74+
+ Regular Expression Introduction
75+
+ Normal characters
76+
+ Special characters
77+
+ Determinative
78+
+ `std::regex`
79+
+ `std::regex`
80+
+ `std::regex_match`
81+
+ `std::match_results`
82+
- [**Chapter 07 Sandard Library: Threads and Concurrency**](./07-thread.md)
83+
+ `std::thread`
84+
+ `std::mutex`
85+
+ `std::unique_lock`
86+
+ `std::future`
87+
+ `std::packaged_task`
88+
+ `std::condition_variable`
89+
- [**Chapter 08 Sandard Library: File System**](./08-filesystem.md)
90+
- [**Chapter 09 Minor Features**](./09-others.md)
91+
+ New Types
92+
+ `long long int`
93+
+ `noexcept`
94+
+ Literal
95+
+ Raw string literal
96+
+ Custom string literal
97+
+ Math Library
98+
- [**Chapter 10 Outlook: Introduction of C++20**](./10-cpp20.md)
99+
+ Concept
100+
+ Range
101+
+ Module
102+
+ Coroutine
103+
- [**Appendix: Further Study Materials**](./appendix.md)
104+
105+
Table of Content | Last Chapter | [Next Chapter: Preface](./00-preface.md)
106+
107+
## Licenses
108+
109+
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is written by [Ou Changkun](https://changkun.de) and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>. The code of this repository is open sourced under the [MIT license](./LICENSE).

pdf/zh-cn/modern-cpp-tutorial.pdf

13.4 KB
Binary file not shown.

pdf/zh-cn/revision.tex

Lines changed: 0 additions & 2 deletions
This file was deleted.

website/src/modern-cpp/about/donate.md

Lines changed: 0 additions & 13 deletions
This file was deleted.
-49.9 KB
Binary file not shown.
-52.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)