From b386fff302bee4c6022329336a312b80953a0097 Mon Sep 17 00:00:00 2001 From: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com> Date: Sun, 26 Dec 2021 18:19:38 +0900 Subject: [PATCH 01/39] git: ignore temporarily created build assets (#220) --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1c18bcf2..f6224793 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,11 @@ website/src/modern-cpp/zh-cn/* website/src/modern-cpp/en-us/* website/src/modern-cpp/exercises website/src/modern-cpp/code +website/src/modern-cpp/about/donate.md +website/src/modern-cpp/assets/alipay.jpg website/src/modern-cpp/assets/cover-2nd-en.png website/src/modern-cpp/assets/cover-2nd.png -website/src/modern-cpp/assets/figures/* \ No newline at end of file +website/src/modern-cpp/assets/cover-2nd-en-logo.png +website/src/modern-cpp/assets/cover-2nd-logo.png +website/src/modern-cpp/assets/figures/* +website/src/modern-cpp/assets/wechat.jpg From 7e6ada9b7c385959b25e2e8d8b7526ea9d0d677e Mon Sep 17 00:00:00 2001 From: Valeriy Dmitriev Date: Mon, 3 Jan 2022 18:19:32 +0500 Subject: [PATCH 02/39] book: typo fixes (#219) --- book/en-us/07-thread.md | 8 ++++---- book/en-us/08-filesystem.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/book/en-us/07-thread.md b/book/en-us/07-thread.md index a49caa4d..7f2d85fb 100644 --- a/book/en-us/07-thread.md +++ b/book/en-us/07-thread.md @@ -69,7 +69,7 @@ int main() { Because C++ guarantees that all stack objects will be destroyed at the end of the declaration period, such code is also extremely safe. Whether `critical_section()` returns normally or if an exception is thrown in the middle, a stack rollback is thrown, and `unlock()` is automatically called. -And `std::unique_lock` is more flexible than `std::lock_guard`, `std::unique_lock` is more flexible. +`std::unique_lock` is more flexible than `std::lock_guard`. Objects of `std::unique_lock` manage the locking and unlocking operations on the `mutex` object with exclusive ownership (no other `unique_lock` objects owning the ownership of a `mutex` object). So in concurrent programming, it is recommended to use `std::unique_lock`. `std::lock_guard` cannot explicitly call `lock` and `unlock`, and `std::unique_lock` can be called anywhere after the declaration. @@ -255,7 +255,7 @@ int main() { } ``` -Intuitively, `a = 5;` seems in `t2` seems to always execute before `flag = 1;`, and `while (flag != 1)` in `t1` seems to guarantee `std ::cout << "b = " << b << std::endl;` will not be executed before the mark is changed. Logically, it seems that the value of `b` should be equal to 5. +Intuitively, it seems that `a = 5;` in `t2` always executes before `flag = 1;` and `while (flag != 1)` in `t1`. It looks like there is a guarantee the line `std ::cout << "b = " << b << std::endl;` will not be executed before the mark is changed. Logically, it seems that the value of `b` should be equal to 5. But the actual situation is much more complicated than this, or the code itself is undefined behavior because, for `a` and `flag`, they are read and written in two parallel threads. There has been competition. Also, even if we ignore competing for reading and writing, it is still possible to receive out-of-order execution of the CPU and the impact of the compiler on the rearrangement of instructions. Cause `a = 5` to occur after `flag = 1`. Thus `b` may output 0. @@ -272,7 +272,7 @@ This is a very strong set of synchronization conditions, in other words when it This seems too harsh for a variable that requires only atomic operations (no intermediate state). The research on synchronization conditions has a very long history, and we will not go into details here. Readers should understand that under the modern CPU architecture, atomic operations at the CPU instruction level are provided. -Therefore, in the C + + 11 multi-threaded shared variable reading and writing, the introduction of the `std::atomic` template, so that we instantiate an atomic type, will be a +Therefore, in the C++11 multi-threaded shared variable reading and writing, the introduction of the `std::atomic` template, so that we instantiate an atomic type, will be a Atomic type read and write operations are minimized from a set of instructions to a single CPU instruction. E.g: ```cpp @@ -544,7 +544,7 @@ They provide a critical foundation for standardized high-performance computing f ## Further Readings -- [C++ 并发编程(中文版)](https://www.amazon.com/dp/1617294691/ref=cm_sw_em_r_mt_dp_U_siEmDbRMMF960) +- [C++ Concurrency in Action](https://www.amazon.com/dp/1617294691/ref=cm_sw_em_r_mt_dp_U_siEmDbRMMF960) - [Thread document](http://en.cppreference.com/w/cpp/thread) - Herlihy, M. P., & Wing, J. M. (1990). Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3), 463–492. https://doi.org/10.1145/78969.78972 diff --git a/book/en-us/08-filesystem.md b/book/en-us/08-filesystem.md index d0c86838..078cd76c 100644 --- a/book/en-us/08-filesystem.md +++ b/book/en-us/08-filesystem.md @@ -10,7 +10,7 @@ order: 8 The file system library provides functions related to the operation of the file system, path, regular files, directories, and so on. -Similar to the regular expression library, he was one of the first libraries +Similar to the regular expression library, it was one of the first libraries to be launched by boost and eventually merged into the C++ standard. ## 8.1 Document and Link From 847b53632de7ee76f4a1bc9723dff063bfb5a28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Vilas-B=C3=B4as?= Date: Mon, 21 Feb 2022 06:47:39 -0300 Subject: [PATCH 03/39] book: add a line break for code formatting (#224) --- book/en-us/02-usability.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book/en-us/02-usability.md b/book/en-us/02-usability.md index e0c26525..2153b32e 100644 --- a/book/en-us/02-usability.md +++ b/book/en-us/02-usability.md @@ -299,7 +299,8 @@ int main() { MagicFoo magicFoo = {1, 2, 3, 4, 5}; std::cout << "magicFoo: "; - for (std::vector::iterator it = magicFoo.vec.begin(); it != magicFoo.vec.end(); ++it) std::cout << *it << std::endl; + for (std::vector::iterator it = magicFoo.vec.begin(); it != magicFoo.vec.end(); ++it) + std::cout << *it << std::endl; } ``` From 1db84fe462cb5b94d298957ac4fcbd14ec907473 Mon Sep 17 00:00:00 2001 From: ambiguoustexture <59325440+ambiguoustexture@users.noreply.github.com> Date: Fri, 25 Feb 2022 23:23:03 +0800 Subject: [PATCH 04/39] book, code: fix typos (#225) --- book/zh-cn/03-runtime.md | 2 +- code/3/3.3.rvalue.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book/zh-cn/03-runtime.md b/book/zh-cn/03-runtime.md index 3738bc1a..e2855df9 100644 --- a/book/zh-cn/03-runtime.md +++ b/book/zh-cn/03-runtime.md @@ -333,7 +333,7 @@ void foo() { ``` 由于 `int&` 不能引用 `double` 类型的参数,因此必须产生一个临时值来保存 `s` 的值, -从而当 `increase()` 修改这个临时值时,从而调用完成后 `s` 本身并没有被修改。 +从而当 `increase()` 修改这个临时值时,调用完成后 `s` 本身并没有被修改。 第二个问题,为什么常量引用允许绑定到非左值?原因很简单,因为 Fortran 需要。 diff --git a/code/3/3.3.rvalue.cpp b/code/3/3.3.rvalue.cpp index 2406ea83..20b30ca8 100644 --- a/code/3/3.3.rvalue.cpp +++ b/code/3/3.3.rvalue.cpp @@ -20,7 +20,7 @@ void reference(std::string&& str) { int main() { std::string lv1 = "string,"; // lv1 is a lvalue - // std::string&& r1 = s1; // illegal, rvalue can't ref to lvalue + // std::string&& r1 = lv1; // illegal, rvalue can't ref to lvalue std::string&& rv1 = std::move(lv1); // legal, std::move can convert lvalue to rvalue std::cout << rv1 << std::endl; // string, From afdc39431f08ac9b71eb1bb8aa997742b2b3b0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Vilas-B=C3=B4as?= Date: Mon, 28 Feb 2022 05:58:23 -0300 Subject: [PATCH 05/39] book: add line breaks for code formatting (#226) --- book/en-us/05-pointers.md | 10 ++++++++-- book/en-us/06-regex.md | 38 +++++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/book/en-us/05-pointers.md b/book/en-us/05-pointers.md index 2e248803..fca5ce77 100644 --- a/book/en-us/05-pointers.md +++ b/book/en-us/05-pointers.md @@ -58,20 +58,26 @@ auto pointer = std::make_shared(10); auto pointer2 = pointer; // reference count+1 auto pointer3 = pointer; // reference count+1 int *p = pointer.get(); // no increase of reference count + std::cout << "pointer.use_count() = " << pointer.use_count() << std::endl; // 3 std::cout << "pointer2.use_count() = " << pointer2.use_count() << std::endl; // 3 std::cout << "pointer3.use_count() = " << pointer3.use_count() << std::endl; // 3 pointer2.reset(); std::cout << "reset pointer2:" << std::endl; + std::cout << "pointer.use_count() = " << pointer.use_count() << std::endl; // 2 -std::cout << "pointer2.use_count() = " << pointer2.use_count() << std::endl; // 0, pointer2 has reset +std::cout << "pointer2.use_count() = " + << pointer2.use_count() << std::endl; // 0, pointer2 has reset std::cout << "pointer3.use_count() = " << pointer3.use_count() << std::endl; // 2 + pointer3.reset(); std::cout << "reset pointer3:" << std::endl; + std::cout << "pointer.use_count() = " << pointer.use_count() << std::endl; // 1 std::cout << "pointer2.use_count() = " << pointer2.use_count() << std::endl; // 0 -std::cout << "pointer3.use_count() = " << pointer3.use_count() << std::endl; // 0, pointer3 has reset +std::cout << "pointer3.use_count() = " + << pointer3.use_count() << std::endl; // 0, pointer3 has reset ``` ## 5.3 `std::unique_ptr` diff --git a/book/en-us/06-regex.md b/book/en-us/06-regex.md index 5793645a..6d4f47c8 100644 --- a/book/en-us/06-regex.md +++ b/book/en-us/06-regex.md @@ -84,7 +84,8 @@ We use a simple example to briefly introduce the use of this library. Consider t int main() { std::string fnames[] = {"foo.txt", "bar.txt", "test", "a0.txt", "AAA.txt"}; - // In C++, `\` will be used as an escape character in the string. In order for `\.` to be passed as a regular expression, it is necessary to perform second escaping of `\`, thus we have `\\.` + // In C++, `\` will be used as an escape character in the string. In order for `\.` + // to be passed as a regular expression, it is necessary to perform second escaping of `\`, thus we have `\\.` std::regex txt_regex("[a-z]+\\.txt"); for (const auto &fname: fnames) std::cout << fname << ": " << std::regex_match(fname, txt_regex) << std::endl; @@ -186,29 +187,32 @@ Please implement the member functions `start()` and `parse_request`. Enable serv template void start_server(SERVER_TYPE &server) { - // process GET request for /match/[digit+numbers], e.g. GET request is /match/abc123, will return abc123 + // process GET request for /match/[digit+numbers], e.g. + // GET request is /match/abc123, will return abc123 server.resource["fill_your_reg_ex"]["GET"] = [](ostream& response, Request& request) { string number=request.path_match[1]; - response << "HTTP/1.1 200 OK\r\nContent-Length: " << number.length() << "\r\n\r\n" << number; + response << "HTTP/1.1 200 OK\r\nContent-Length: " << number.length() + << "\r\n\r\n" << number; }; // peocess default GET request; anonymous function will be called if no other matches // response files in folder web/ // default: index.html - server.default_resource["fill_your_reg_ex"]["GET"] = [](ostream& response, Request& request) { - string filename = "www/"; - - string path = request.path_match[1]; - - // forbidden use `..` access content outside folder web/ - size_t last_pos = path.rfind("."); - size_t current_pos = 0; - size_t pos; - while((pos=path.find('.', current_pos)) != string::npos && pos != last_pos) { - current_pos = pos; - path.erase(pos, 1); - last_pos--; - } + server.default_resource["fill_your_reg_ex"]["GET"] = + [](ostream& response, Request& request) { + string filename = "www/"; + + string path = request.path_match[1]; + + // forbidden use `..` access content outside folder web/ + size_t last_pos = path.rfind("."); + size_t current_pos = 0; + size_t pos; + while((pos=path.find('.', current_pos)) != string::npos && pos != last_pos) { + current_pos = pos; + path.erase(pos, 1); + last_pos--; + } // (...) }; From aca2d372d73bcb2486958b463599362208abdace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Mon, 28 Feb 2022 17:00:16 +0800 Subject: [PATCH 06/39] book: use https for urls (#223) --- README-zh-cn.md | 4 ++-- README.md | 2 +- book/en-us/00-preface.md | 2 +- book/en-us/01-intro.md | 2 +- book/en-us/02-usability.md | 4 ++-- book/en-us/03-runtime.md | 2 +- book/en-us/04-containers.md | 2 +- book/en-us/05-pointers.md | 4 ++-- book/en-us/06-regex.md | 6 +++--- book/en-us/07-thread.md | 4 ++-- book/en-us/08-filesystem.md | 2 +- book/en-us/09-others.md | 2 +- book/en-us/10-cpp20.md | 4 ++-- book/en-us/appendix1.md | 4 ++-- book/en-us/appendix2.md | 2 +- book/en-us/toc.md | 2 +- book/zh-cn/00-preface.md | 4 ++-- book/zh-cn/01-intro.md | 8 ++++---- book/zh-cn/02-usability.md | 6 +++--- book/zh-cn/03-runtime.md | 4 ++-- book/zh-cn/04-containers.md | 4 ++-- book/zh-cn/05-pointers.md | 6 +++--- book/zh-cn/06-regex.md | 8 ++++---- book/zh-cn/07-thread.md | 6 +++--- book/zh-cn/08-filesystem.md | 4 ++-- book/zh-cn/09-others.md | 4 ++-- book/zh-cn/10-cpp20.md | 6 +++--- book/zh-cn/appendix1.md | 6 +++--- book/zh-cn/appendix2.md | 4 ++-- book/zh-cn/toc.md | 4 ++-- pdf/en-us/meta/template.tex | 2 +- pdf/zh-cn/meta/template.tex | 2 +- website/src/modern-cpp/about/copyright.md | 4 ++-- website/themes/moderncpp/layout/index.ejs | 4 ++-- website/themes/moderncpp/layout/page.ejs | 4 ++-- 35 files changed, 69 insertions(+), 69 deletions(-) diff --git a/README-zh-cn.md b/README-zh-cn.md index 1b0aef83..4b06afa7 100644 --- a/README-zh-cn.md +++ b/README-zh-cn.md @@ -59,6 +59,6 @@ $ make build ## 许可 -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](./LICENSE)。 +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](./LICENSE)。 diff --git a/README.md b/README.md index 537b6adb..45df2bec 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,4 @@ The author is grateful to all contributors, including but not limited to [Contri ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](./LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](./LICENSE). diff --git a/book/en-us/00-preface.md b/book/en-us/00-preface.md index 067cf0ea..b93705a3 100644 --- a/book/en-us/00-preface.md +++ b/book/en-us/00-preface.md @@ -49,4 +49,4 @@ There are few exercises At the end of each chapter of the book. It is for testin ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/01-intro.md b/book/en-us/01-intro.md index e31087bb..0b203dda 100644 --- a/book/en-us/01-intro.md +++ b/book/en-us/01-intro.md @@ -146,4 +146,4 @@ Don't worry at the moment, we will come to meet them in our later chapters. ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/02-usability.md b/book/en-us/02-usability.md index 2153b32e..ee908378 100644 --- a/book/en-us/02-usability.md +++ b/book/en-us/02-usability.md @@ -485,7 +485,7 @@ R add(T x, U y) { } ``` -> Note: There is no difference between typename and class in the template parameter list. Before the keyword typename appears, class is used to define the template parameters. However, when defining a variable with [nested dependency type](http://en.cppreference.com/w/cpp/language/dependent_name#The_typename_disambiguator_for_dependent_names) in the template, you need to use typename to eliminate ambiguity. +> Note: There is no difference between typename and class in the template parameter list. Before the keyword typename appears, class is used to define the template parameters. However, when defining a variable with [nested dependency type](https://en.cppreference.com/w/cpp/language/dependent_name#The_typename_disambiguator_for_dependent_names) in the template, you need to use typename to eliminate ambiguity. Such code is very ugly because the programmer must explicitly indicate the return type when using this template function. @@ -1106,4 +1106,4 @@ This section introduces the enhancements to language usability in modern C++, wh ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/03-runtime.md b/book/en-us/03-runtime.md index 878c127c..d75f1bc4 100644 --- a/book/en-us/03-runtime.md +++ b/book/en-us/03-runtime.md @@ -637,4 +637,4 @@ Lambda expression ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/04-containers.md b/book/en-us/04-containers.md index 96842464..fe1d5300 100644 --- a/book/en-us/04-containers.md +++ b/book/en-us/04-containers.md @@ -305,4 +305,4 @@ Although `std::tuple` is effective, the standard library provides limited functi ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/05-pointers.md b/book/en-us/05-pointers.md index fca5ce77..38c167cc 100644 --- a/book/en-us/05-pointers.md +++ b/book/en-us/05-pointers.md @@ -202,8 +202,8 @@ The technology of smart pointers is not novel. It is a common technology in many ## Further Readings -- [Why does C++11 have `make_shared` but not `make_unique`](http://stackoverflow.com/questions/12580432/why-does-c11-have-make-shared-but-not-make-unique) +- [Why does C++11 have `make_shared` but not `make_unique`](https://stackoverflow.com/questions/12580432/why-does-c11-have-make-shared-but-not-make-unique) ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/06-regex.md b/book/en-us/06-regex.md index 6d4f47c8..dd2963fb 100644 --- a/book/en-us/06-regex.md +++ b/book/en-us/06-regex.md @@ -227,9 +227,9 @@ An suggested solution can be found [here](../../exercises/6). ## Further Readings -1. [Comments from `std::regex`'s author](http://zhihu.com/question/23070203/answer/84248248) -2. [Library document of Regular Expression](http://en.cppreference.com/w/cpp/regex) +1. [Comments from `std::regex`'s author](https://zhihu.com/question/23070203/answer/84248248) +2. [Library document of Regular Expression](https://en.cppreference.com/w/cpp/regex) ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/07-thread.md b/book/en-us/07-thread.md index 7f2d85fb..8c5d0333 100644 --- a/book/en-us/07-thread.md +++ b/book/en-us/07-thread.md @@ -545,9 +545,9 @@ They provide a critical foundation for standardized high-performance computing f ## Further Readings - [C++ Concurrency in Action](https://www.amazon.com/dp/1617294691/ref=cm_sw_em_r_mt_dp_U_siEmDbRMMF960) -- [Thread document](http://en.cppreference.com/w/cpp/thread) +- [Thread document](https://en.cppreference.com/w/cpp/thread) - Herlihy, M. P., & Wing, J. M. (1990). Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3), 463–492. https://doi.org/10.1145/78969.78972 ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE).` +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE).` diff --git a/book/en-us/08-filesystem.md b/book/en-us/08-filesystem.md index 078cd76c..10085030 100644 --- a/book/en-us/08-filesystem.md +++ b/book/en-us/08-filesystem.md @@ -27,4 +27,4 @@ TODO: ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file diff --git a/book/en-us/09-others.md b/book/en-us/09-others.md index 9db078ef..773a9612 100644 --- a/book/en-us/09-others.md +++ b/book/en-us/09-others.md @@ -203,4 +203,4 @@ effective Let the compiler optimize our code to the maximum extent possible. ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/10-cpp20.md b/book/en-us/10-cpp20.md index 8988edf3..04c69ee1 100644 --- a/book/en-us/10-cpp20.md +++ b/book/en-us/10-cpp20.md @@ -94,9 +94,9 @@ This is still full of charm for a programming language that is already in its th ## Further Readings - [Why Concepts didn't make C++17?](http://honermann.net/blog/2016/03/06/why-concepts-didnt-make-cxx17/) -- [C++11/14/17/20 Compiler Support](http://en.cppreference.com/w/cpp/compiler_support) +- [C++11/14/17/20 Compiler Support](https://en.cppreference.com/w/cpp/compiler_support) - [C++ History](https://en.cppreference.com/w/cpp/language/history) ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). diff --git a/book/en-us/appendix1.md b/book/en-us/appendix1.md index dd17766b..cfde041c 100644 --- a/book/en-us/appendix1.md +++ b/book/en-us/appendix1.md @@ -10,7 +10,7 @@ First of all, congratulations 🎉 on reading this book! I hope this book has ra As mentioned in the introduction to this book, this book is just a book that takes you quickly to the new features of modern C++ 11/14/17/20, rather than the advanced learning practice of C++ "Black Magic". The author of course also thinks about this demand, but the content is very difficult and there are few audiences. Here, the author lists some materials that can help you learn more about modern C++ based on this book. I hope I can help you: -- [C++ Reference](http://en.cppreference.com/w) +- [C++ Reference](https://en.cppreference.com/w) - [CppCon YouTube Channel](https://www.youtube.com/user/CppCon/videos) - [Ulrich Drepper. What Every Programmer Should Know About Memory. 2007](https://people.freebsd.org/~lstewart/articles/cpumemory.pdf) - to be added @@ -19,4 +19,4 @@ As mentioned in the introduction to this book, this book is just a book that tak ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file diff --git a/book/en-us/appendix2.md b/book/en-us/appendix2.md index 8d377b9c..aa1053e9 100644 --- a/book/en-us/appendix2.md +++ b/book/en-us/appendix2.md @@ -36,4 +36,4 @@ TODO: ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file diff --git a/book/en-us/toc.md b/book/en-us/toc.md index 89607e0a..2f03b307 100644 --- a/book/en-us/toc.md +++ b/book/en-us/toc.md @@ -109,4 +109,4 @@ Table of Content | Last Chapter | [Next Chapter: Preface](./00-preface.md) ## Licenses -Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file +Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file diff --git a/book/zh-cn/00-preface.md b/book/zh-cn/00-preface.md index a60a0ef6..ec04257d 100644 --- a/book/zh-cn/00-preface.md +++ b/book/zh-cn/00-preface.md @@ -46,6 +46,6 @@ C++17 则是近三年依赖 C++ 社区一致推进的方向,也指出了 **现 ## 许可 -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/01-intro.md b/book/zh-cn/01-intro.md index 80e324c1..a74a3724 100644 --- a/book/zh-cn/01-intro.md +++ b/book/zh-cn/01-intro.md @@ -138,12 +138,12 @@ clean: ## 进一步阅读的参考文献 - [C++ 语言导学. Bjarne Stroustrup](https://www.amazon.cn/dp/B00WUBYBYS/ref=sr_1_1?ie=UTF8&qid=1522400738&sr=8-1&keywords=C%2B%2B+%E8%AF%AD%E8%A8%80%E5%AF%BC%E5%AD%A6) -- [C++ 历史](http://en.cppreference.com/w/cpp/language/history) -- [C++ 特性在 GCC/Clang 等编译器中的支持情况](http://en.cppreference.com/w/cpp/compiler_support) +- [C++ 历史](https://en.cppreference.com/w/cpp/language/history) +- [C++ 特性在 GCC/Clang 等编译器中的支持情况](https://en.cppreference.com/w/cpp/compiler_support) - [C++98 与 C99 之间的区别](http://david.tribble.com/text/cdiffs.htm#C99-vs-CPP98) ## 许可 -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/02-usability.md b/book/zh-cn/02-usability.md index b4710e2d..a12bacb4 100644 --- a/book/zh-cn/02-usability.md +++ b/book/zh-cn/02-usability.md @@ -417,7 +417,7 @@ R add(T x, U y) { } ``` -> 注意:typename 和 class 在模板参数列表中没有区别,在 typename 这个关键字出现之前,都是使用 class 来定义模板参数的。但在模板中定义有[嵌套依赖类型](http://en.cppreference.com/w/cpp/language/dependent_name#The_typename_disambiguator_for_dependent_names)的变量时,需要用 typename 消除歧义 +> 注意:typename 和 class 在模板参数列表中没有区别,在 typename 这个关键字出现之前,都是使用 class 来定义模板参数的。但在模板中定义有[嵌套依赖类型](https://en.cppreference.com/w/cpp/language/dependent_name#The_typename_disambiguator_for_dependent_names)的变量时,需要用 typename 消除歧义 这样的代码其实变得很丑陋,因为程序员在使用这个模板函数的时候,必须明确指出返回类型。但事实上我们并不知道 `add()` 这个函数会做什么样的操作,以及获得一个什么样的返回类型。 @@ -1019,6 +1019,6 @@ std::cout << new_enum::value3 << std::endl ## 许可 -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/03-runtime.md b/book/zh-cn/03-runtime.md index e2855df9..857d8adc 100644 --- a/book/zh-cn/03-runtime.md +++ b/book/zh-cn/03-runtime.md @@ -567,6 +567,6 @@ constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type&& __t) noexcep ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/04-containers.md b/book/zh-cn/04-containers.md index d39205db..e3aded40 100644 --- a/book/zh-cn/04-containers.md +++ b/book/zh-cn/04-containers.md @@ -305,6 +305,6 @@ for(int i = 0; i != tuple_len(new_tuple); ++i) ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/05-pointers.md b/book/zh-cn/05-pointers.md index bdfaf595..08dc48b8 100644 --- a/book/zh-cn/05-pointers.md +++ b/book/zh-cn/05-pointers.md @@ -183,10 +183,10 @@ int main() { ## 进一步阅读的参考资料 -1. [stackoverflow 上关于『C++11为什么没有 make_unique』的讨论](http://stackoverflow.com/questions/12580432/why-does-c11-have-make-shared-but-not-make-unique) +1. [stackoverflow 上关于『C++11为什么没有 make_unique』的讨论](https://stackoverflow.com/questions/12580432/why-does-c11-have-make-shared-but-not-make-unique) ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/06-regex.md b/book/zh-cn/06-regex.md index 65647575..b24da50b 100644 --- a/book/zh-cn/06-regex.md +++ b/book/zh-cn/06-regex.md @@ -230,11 +230,11 @@ void start_server(SERVER_TYPE &server) { ## 进一步阅读的参考资料 -1. [知乎『如何评价 GCC 的 C++11 正则表达式?』中原库作者 Tim Shen 的回答](http://zhihu.com/question/23070203/answer/84248248) -2. [正则表达式库文档](http://en.cppreference.com/w/cpp/regex) +1. [知乎『如何评价 GCC 的 C++11 正则表达式?』中原库作者 Tim Shen 的回答](https://zhihu.com/question/23070203/answer/84248248) +2. [正则表达式库文档](https://en.cppreference.com/w/cpp/regex) ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/07-thread.md b/book/zh-cn/07-thread.md index e4982040..6a402bc9 100644 --- a/book/zh-cn/07-thread.md +++ b/book/zh-cn/07-thread.md @@ -554,11 +554,11 @@ C++11 语言层提供了并发编程的相关支持,本节简单的介绍了 ` ## 进一步阅读的参考资料 - [C++ 并发编程\(中文版\)](https://www.gitbook.com/book/chenxiaowei/cpp_concurrency_in_action/details) -- [线程支持库文档](http://en.cppreference.com/w/cpp/thread) +- [线程支持库文档](https://en.cppreference.com/w/cpp/thread) - Herlihy, M. P., & Wing, J. M. (1990). Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3), 463–492. https://doi.org/10.1145/78969.78972 ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/08-filesystem.md b/book/zh-cn/08-filesystem.md index 050a6167..be60a5a2 100644 --- a/book/zh-cn/08-filesystem.md +++ b/book/zh-cn/08-filesystem.md @@ -22,6 +22,6 @@ TODO: ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/09-others.md b/book/zh-cn/09-others.md index fe9d7c59..8dc1861e 100644 --- a/book/zh-cn/09-others.md +++ b/book/zh-cn/09-others.md @@ -187,6 +187,6 @@ int main() { ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/book/zh-cn/10-cpp20.md b/book/zh-cn/10-cpp20.md index df09348d..c1a4f6a0 100644 --- a/book/zh-cn/10-cpp20.md +++ b/book/zh-cn/10-cpp20.md @@ -89,11 +89,11 @@ TODO: ## 进一步阅读的参考资料 - [Why Concepts didn't make C++17?](http://honermann.net/blog/2016/03/06/why-concepts-didnt-make-cxx17/) -- [C++11/14/17/20 编译器支持情况](http://en.cppreference.com/w/cpp/compiler_support) +- [C++11/14/17/20 编译器支持情况](https://en.cppreference.com/w/cpp/compiler_support) - [C++ 历史](https://en.cppreference.com/w/cpp/language/history) ## 许可 -知识共享许可协议 +知识共享许可协议 -本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 \ No newline at end of file +本教程由[欧长坤](https://github.com/changkun)撰写,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 \ No newline at end of file diff --git a/book/zh-cn/appendix1.md b/book/zh-cn/appendix1.md index fbc6a2f1..e0a32d6c 100644 --- a/book/zh-cn/appendix1.md +++ b/book/zh-cn/appendix1.md @@ -10,7 +10,7 @@ order: 11 正如本书引言部分提到的,本书只是一本带你快速领略现代 C++ 11/14/17/20 新特性的读物,而非进阶学习实践 C++『黑魔法』的内容。笔者当然也想到了这个需求,只是这样的内容非常艰深,鲜有受众。在此,笔者列出一些能够帮助你在此书基础之上进一步学习现代 C++ 的资料,希望能够祝你一臂之力: -- [C++ 参考](http://en.cppreference.com/w) +- [C++ 参考](https://en.cppreference.com/w) - [CppCon YouTube 频道](https://www.youtube.com/user/CppCon/videos) - [Ulrich Drepper. 每位程序员都需要知道的内存知识. 2007](https://people.freebsd.org/~lstewart/articles/cpumemory.pdf) - 待补充 @@ -19,6 +19,6 @@ order: 11 ## 许可 -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 \ No newline at end of file +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 \ No newline at end of file diff --git a/book/zh-cn/appendix2.md b/book/zh-cn/appendix2.md index 6fce2b02..bf8e907f 100644 --- a/book/zh-cn/appendix2.md +++ b/book/zh-cn/appendix2.md @@ -36,6 +36,6 @@ TODO: ## 许可 -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 \ No newline at end of file +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 \ No newline at end of file diff --git a/book/zh-cn/toc.md b/book/zh-cn/toc.md index 5a444896..fa2cbd9b 100644 --- a/book/zh-cn/toc.md +++ b/book/zh-cn/toc.md @@ -109,6 +109,6 @@ ## 许可 -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 MIT 协议开源,参见[许可](../../LICENSE)。 diff --git a/pdf/en-us/meta/template.tex b/pdf/en-us/meta/template.tex index 380f6195..bd22952d 100644 --- a/pdf/en-us/meta/template.tex +++ b/pdf/en-us/meta/template.tex @@ -172,7 +172,7 @@ \vspace{1em} \textbf{\large License} - \noindent This work was written by \href{https://github.com/changkun}{Ou Changkun} and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. \texttt{\small http://creativecommons.org/licenses/by-nc-nd/4.0/} + \noindent This work was written by \href{https://github.com/changkun}{Ou Changkun} and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. \texttt{\small https://creativecommons.org/licenses/by-nc-nd/4.0/} \vspace{5em} \includegraphics{../../assets/cover-2nd-en} diff --git a/pdf/zh-cn/meta/template.tex b/pdf/zh-cn/meta/template.tex index 69f60116..9288c338 100644 --- a/pdf/zh-cn/meta/template.tex +++ b/pdf/zh-cn/meta/template.tex @@ -179,7 +179,7 @@ \vspace{1em} \textbf{\large 版权声明} - \noindent 本书系\href{https://github.com/changkun}{欧长坤}著,采用“知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 (cc by-nc-sa)”进行许可。\texttt{\small http://creativecommons.org/licenses/by-nc-nd/4.0/} + \noindent 本书系\href{https://github.com/changkun}{欧长坤}著,采用“知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 (cc by-nc-sa)”进行许可。\texttt{\small https://creativecommons.org/licenses/by-nc-nd/4.0/} \vspace{7em} \includegraphics{../../assets/cover-2nd} diff --git a/website/src/modern-cpp/about/copyright.md b/website/src/modern-cpp/about/copyright.md index c63c60e5..b065dc43 100755 --- a/website/src/modern-cpp/about/copyright.md +++ b/website/src/modern-cpp/about/copyright.md @@ -4,6 +4,6 @@ type: about order: 3 --- -知识共享许可协议 +知识共享许可协议 -本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 [MIT](https://opensource.org/licenses/MIT) 协议开源。 \ No newline at end of file +本书系[欧长坤](https://github.com/changkun)著,采用[知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/)许可。项目中代码使用 [MIT](https://opensource.org/licenses/MIT) 协议开源。 \ No newline at end of file diff --git a/website/themes/moderncpp/layout/index.ejs b/website/themes/moderncpp/layout/index.ejs index 0dbd3cd9..f5677d0f 100755 --- a/website/themes/moderncpp/layout/index.ejs +++ b/website/themes/moderncpp/layout/index.ejs @@ -51,11 +51,11 @@ diff --git a/website/themes/moderncpp/layout/page.ejs b/website/themes/moderncpp/layout/page.ejs index 15616e53..29209a2b 100755 --- a/website/themes/moderncpp/layout/page.ejs +++ b/website/themes/moderncpp/layout/page.ejs @@ -26,7 +26,7 @@