Skip to content

Commit

Permalink
add: contributing guidelines & Typo fix (changkun#60)
Browse files Browse the repository at this point in the history
* fix: typo

* update: pdf builds & website builds

* update: contributing guidelines
  • Loading branch information
changkun authored Jan 31, 2019
1 parent ee0a266 commit 7ce3aa2
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 19 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: 报告错误

---

## 实际描述

- 文件路径:例如,book/zh-cn/02-usability.md
- 原文段落:

```
复制原文段落
```

## 预期描述

```
修改后的段落
```

## 附图

必要时,请附上相关截图
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: 内容建议

---

## 动机

请描述你提交内容建议的动机。

## 需求说明

请描述你提交内容建议的详单,例如具体是增加哪个知识点的说明。
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Question
about: 提交问题

---

## 问题描述

请在此描述你的问题,提问前请参考[提问的智慧](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md)
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resolve #issue_id

## 说明

此处详细说明 PR 的动机是什么、解决了什么样的问题。

## 变化箱单

- 修复了 XXX 的 typo 错误
- 增加了 XXX 相关的说明
- 解决了关于 XXX 的描述性错误

## 参考文献

如果有请注明
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 如何参与贡献

[![](https://img.shields.io/badge/chat-%E4%BA%A4%E6%B5%81-667ed5.svg)](./assets/community.md)

## 提交 Issue

『C++ 11/14/17』的 issue 用于追踪书中存在的原则性的描述错误、存在的 `typo` 错误,以及向本书作者提问等。

- 通常情况下,你可能会发现书中某个段落存在错别字、语义错误、文法错误等。
这都是 `typo` 错误。如果该错误已经对你的阅读造成了一定障碍,
你也强烈的认为该 `typo` 也会影响到其他人的阅读,
那么非常欢迎[提交 issue](https://github.com/changkun/modern-cpp-tutorial/issues)
来报告 `typo` 错误。

- 对于书中存在的原则性错误,例如对源码进行分析的内容产生明显的错误、
且内容对其他人会产生严重的误导,请不要犹豫,
立即[提交 issue](https://github.com/changkun/modern-cpp-tutorial/issues) 来报告此错误,以免继续传播错误的知识。
如果可以,也请附上相关改进说明。通常情况下,如果存在这类问题,我们鼓励你一并提交改进 PR。

- 如果你在阅读本书的时候发现有部分内容难于理解,也欢迎[提交 issue](https://github.com/changkun/modern-cpp-tutorial/issues) 来询问作者表达你的疑惑。
作者会根据实际情况重新优化这一部分的内容,进而帮助他人更易阅读这部分的内容。

- 我们也欢迎你提交针对本书内容的相关建议,具体来说如果你认为书中未涉及的某个模块或者文件的源码值得讨论,也欢迎 [提交 issue](https://github.com/changkun/go-under-the-hood/issues) 来进一步讨论。

## 提交 Pull request

『C++ 11/14/17』是一本开源书籍,任何人都可以参与贡献自己 PR。但在提交 PR 之前请仔细阅读下面的说明:

- 当你认为需要提交一个 PR 时,请确保 [issue 列表](https://github.com/changkun/modern-cpp-tutorial/issues)中,已经包含了你想要解决的问题。
如果没有,请参考**提交 Issue** 一节中的描述,提交你的 issue,再提交你的 PR。

- 当你准备提交一个 typo 错误的 PR 时,请确保你的 PR 改进了 **超过 50 个汉字(或英文单词)**`typo` 错误,否则请不要提交 PR。
- 对于一个修复原则性错误的 PR,请不要犹豫,笔者对此表示非常感谢!
- 如果非常喜欢本书,以至于希望参与本书的合著,成为作者,请发邮件询问:`hi at changkun dot us`

本仓库提供了多种阅读方式,如果你提交一个 Pull request,则请确保你检查的如下的 checklist:

- [ ] 只改动原书正文 `book` 下的部分内容,不涉及代码片段的修改,则无需进行修改
- [ ] 如果同时还改动了正文中的代码片段,则需要同步 `code` 文件夹下对应的代码片段
- [ ] 如果改动还涉及习题的设计,则需要同步 `exercises` 文件夹下的内容
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

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

![](https://img.shields.io/badge/version-v2-green.svg)
[![](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)
[![](https://img.shields.io/badge/%C2%A5-%E8%B5%9E%E5%8A%A9-ff69b4.svg)](./assets/donate.md)
[![](https://img.shields.io/badge/chat-%E4%BA%A4%E6%B5%81-667ed5.svg)](./assets/community.md)

## 本书目的

Expand Down Expand Up @@ -42,7 +40,7 @@

## 致谢

笔者时间和水平有限,如果读者发现书中内容的错误,欢迎提 [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)
笔者时间和水平有限,如果读者发现书中内容的错误,欢迎提 [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)

## 许可

Expand Down
2 changes: 1 addition & 1 deletion book/zh-cn/05-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main()
}
```
`std::shared_ptr` 可以通过 `get()` 方法来获取原始指针,通过 `reset()` 来减少一个引用计数,并通过`get_count()`来查看一个对象的引用计数。例如:
`std::shared_ptr` 可以通过 `get()` 方法来获取原始指针,通过 `reset()` 来减少一个引用计数,并通过`use_count()`来查看一个对象的引用计数。例如:
```cpp
auto pointer = std::make_shared<int>(10);
Expand Down
5 changes: 5 additions & 0 deletions pdf/en-us/modern-cpp-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "C++11/14/17 On the Fly"
author: Changkun Ou <hi@changkun.us>
copyright: cc-by-nc-nd 4.0
---
109 changes: 109 additions & 0 deletions pdf/en-us/toc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# C++ 11/14/17 On The Fly

> This book adapting to C++17 and translating to English
## Table of Contents

- [**Preface**](./00-preface.md)
- [**Chapter 01 Towards C++11/14/17**](./01-intro.md)
+ 1.1 Deprecated Features
+ 1.2 Compatibility with C
+ Further Readings
- [**Chapter 02 Language Usability Enhancements**](./02-usability.md)
+ 2.1 Constants
- nullptr
- constexpr
+ 2.2 Variables & Initialization
- Conditional Statement
- Initializer List
- Structured binding
+ 2.3 Type Deduction
- auto
- decltype
- Tail return type
- decltype(auto)
+ 2.4 Control Flow
- if constexpr
- Range-based for loop
+ 2.5 Templates
- External templates
- The ">"
- Type alias templates
- Default template parameters
- Variadic templates
- Fold expression
+ 2.6 Object-oriented
- Delegate constructor
- Inheritance constructor
- Explicit virtual function overwrite
- override
- final
- Explicit delete default function
- Strongly typed enumerations
- [**Chapter 03 Language Runtime Enhancements**](./03-runtime.md)
+ Lambda expression
+ Basics
+ Value capture
+ Reference capture
+ Implicit capture
+ Expression capture
+ Generic lambda
+ Function object wrapper
+ std::function
+ std::bind/std::placeholder
+ rvalue reference
+ lvalue, rvalue, prvalue, xvalue
+ rvalue reference & lvalue reference
+ Move semantics
+ Perfect forwarding
- [**Chapter 04 Sandard Library: Containers**](./04-containers.md)
+ `std::array`
+ `std::forward_list`
+ `std::unordered_set`
+ `std::unordered_map`
+ `std::tuple`
+ basic operation
+ runtime indexing
+ merge and iteration
- [**Chapter 05 Sandard Library: Pointers**](./05-pointers.md)
+ RAII and reference counting
+ `std::shared_ptr`
+ `std::unique_ptr`
+ `std::weak_ptr`
- [**Chapter 06 Sandard Library: Regular Expression**](./06-regex.md)
+ Regular Expression Introduction
+ Normal characters
+ Special characters
+ Determinative
+ `std::regex`
+ `std::regex`
+ `std::regex_match`
+ `std::match_results`
- [**Chapter 07 Sandard Library: Threads and Concurrency**](./07-thread.md)
+ `std::thread`
+ `std::mutex`
+ `std::unique_lock`
+ `std::future`
+ `std::packaged_task`
+ `std::condition_variable`
- [**Chapter 08 Sandard Library: File System**](./08-filesystem.md)
- [**Chapter 09 Minor Features**](./09-others.md)
+ New Types
+ `long long int`
+ `noexcept`
+ Literal
+ Raw string literal
+ Custom string literal
+ Math Library
- [**Chapter 10 Outlook: Introduction of C++20**](./10-cpp20.md)
+ Concept
+ Range
+ Module
+ Coroutine
- [**Appendix: Further Study Materials**](./appendix.md)

Table of Content | Last Chapter | [Next Chapter: Preface](./00-preface.md)

## Licenses

<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).
Binary file modified pdf/zh-cn/modern-cpp-tutorial.pdf
Binary file not shown.
2 changes: 0 additions & 2 deletions pdf/zh-cn/revision.tex

This file was deleted.

13 changes: 0 additions & 13 deletions website/src/modern-cpp/about/donate.md

This file was deleted.

Binary file removed website/src/modern-cpp/assets/alipay.jpg
Binary file not shown.
Binary file removed website/src/modern-cpp/assets/wechat.jpg
Binary file not shown.

0 comments on commit 7ce3aa2

Please sign in to comment.