Modern-CPP-Programming-Cookbook-Second-Edition

所属分类:电子书籍
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2022-08-07 16:51:35
上 传 者sh-1993
说明:  现代C++编程食谱,第二版,由Packt出版
(Modern C++ Programming Cookbook, Second Edition, published by Packt)

文件列表:
CMakeLists.txt (2825, 2022-08-07)
Chapter01/ (0, 2022-08-07)
Chapter01/CMakeLists.txt (171, 2022-08-07)
Chapter01/main.cpp (847, 2022-08-07)
Chapter01/recipe_1_01.h (2492, 2022-08-07)
Chapter01/recipe_1_02.h (1166, 2022-08-07)
Chapter01/recipe_1_03.h (2527, 2022-08-07)
Chapter01/recipe_1_04.h (2352, 2022-08-07)
Chapter01/recipe_1_05.h (1670, 2022-08-07)
Chapter01/recipe_1_06.h (1709, 2022-08-07)
Chapter01/recipe_1_07.h (1832, 2022-08-07)
Chapter01/recipe_1_08.h (2075, 2022-08-07)
Chapter01/recipe_1_09.h (2952, 2022-08-07)
Chapter01/recipe_1_10.h (2496, 2022-08-07)
Chapter01/recipe_1_11_1.cpp (313, 2022-08-07)
Chapter01/recipe_1_11_1.h (60, 2022-08-07)
Chapter01/recipe_1_11_2.cpp (313, 2022-08-07)
Chapter01/recipe_1_11_2.h (60, 2022-08-07)
Chapter01/recipe_1_11_3.cpp (172, 2022-08-07)
Chapter01/recipe_1_12.h (649, 2022-08-07)
Chapter01/recipe_1_13.h (2571, 2022-08-07)
Chapter01/recipe_1_14.h (1720, 2022-08-07)
Chapter02/ (0, 2022-08-07)
Chapter02/CMakeLists.txt (117, 2022-08-07)
Chapter02/main.cpp (782, 2022-08-07)
Chapter02/recipe_2_01.h (2368, 2022-08-07)
Chapter02/recipe_2_02.h (1743, 2022-08-07)
Chapter02/recipe_2_03.h (2384, 2022-08-07)
Chapter02/recipe_2_04.h (998, 2022-08-07)
Chapter02/recipe_2_05.h (1442, 2022-08-07)
Chapter02/recipe_2_06.h (4012, 2022-08-07)
Chapter02/recipe_2_07.h (2596, 2022-08-07)
Chapter02/recipe_2_08.h (6175, 2022-08-07)
Chapter02/recipe_2_09.h (3095, 2022-08-07)
Chapter02/recipe_2_10.h (1625, 2022-08-07)
Chapter02/recipe_2_11.h (1452, 2022-08-07)
Chapter02/recipe_2_12.h (1916, 2022-08-07)
Chapter02/recipe_2_13.h (1864, 2022-08-07)
... ...

# Modern C++ Programming Cookbook - 2nd Edition This is the code repository for **Modern C++ Programming Cookbook - 2nd Edition**, published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the book from start to finish. ## About the Book Beginning with the modern language features, each recipe addresses a specific problem, with a discussion that explains the solution and offers insight into how it works. You will learn major concepts about the core programming language as well as common tasks faced while building a wide variety of software from enterprise grade apps to low latency software. You will learn about concepts such as concurrency, performance, testing, and more in the form of recipes. These recipes will ensure you can make your applications secure and fast. ## Instructions and Navigation All of the code is organized into folders, one for each chapter. Some chapters contain one header file for each recipe in that chapter. In this cases, the header files are called recipe_1_01.h, recipe_1_02.h, etc. Other chapters, contain multiple programs, one for each recipe. In this case, in recipe has its own folder with names such as chapter12_01_1, chapter12_01_2, etc. The code will look like the following: ``` #include int main() { std::cout << "Hello World!\n"; } ``` The code presented in the book is available for download from your account at https://www.packtpub.com/, although I encourage you to try writing all the samples by yourself. In order to compile them, you need VC++ 2019 16.5 on Windows and GCC 10.0 or Clang 11.0 on Linux and Mac. If you don't have the latest version of the compiler, or you want to try another compiler, you can use one that is available online. Although there are various online platforms that you could use, I recommend https://wandbox.org/ or https://godbolt.org/. ## 3rd party libraries The following libraries are required/optional for building the code: | Libary | Path | Purpose | | ------ | ---- | ------- | | Boost.Test | https://www.boost.org/ | Testing projects in chapter 11 | | Google Test | https://github.com/google/googletest | Testing projects in chapter 11 | | Catch2 | https://github.com/catchorg/Catch2 | Testing projects in chapter 11 | | Range-v3 | https://github.com/ericniebler/range-v3 | Ranges examples in chapter 12 | | cppcoro | https://github.com/lewissbaker/cppcoro | Coroutines examples in chapter 12 | ## Building the code The code can be build using CMake. The CMake files provided with the source code require CMake 3.15.0 or newer. The following values can be set: * `SKIP_TEST_PROJECTS` Flag to prevent the generation of unit test projects (from chapter 11) * `BOOST_PATH` Path to the installation path of Boost (required unless `SKIP_TEST_PROJECTS` is `ON`) * `GTEST_PATH` Path to the installation path of Google Test (required unless `SKIP_TEST_PROJECTS` is `ON`) * `GTEST_PATH_LIB` Path to the Google Test libraries directory (required unless `SKIP_TEST_PROJECTS` is `ON`) * `CATCH_PATH` Path to the installation path of Catch2 (required unless `SKIP_TEST_PROJECTS` is `ON`) * `RANGES_PATH` Path to the installation path of Ranges-v3 (required if `USE_RANGES_V3` is `ON`) * `CPPCORO_PATH` Path to the installation path of cppcoro (required for chapter 12) The following example shows how to generate projects for Visual Studio 2019: ``` cmake -G "Visual Studio 16 2019" -DBOOST_PATH=c:/Work/Libraries/boost_1_73_0/ -DGTEST_PATH=c:/Work/Libraries/googletest_1_10/googletest/include/ -DGTEST_PATH_LIB=c:/Work/Libraries/googletest_1_10/lib/ -DCATCH_PATH=c:/Work/Libraries/Catch2/single_include/ -DUSE_RANGES_V3=ON -DRANGES_PATH=c:/Work/Libraries/range-v3-master/include/ -DCPPCORO_PATH=c:/Work/Libraries/cppcoro-master -S .\ -B .\build ``` ### Suggestions and Feedback [Click here](https://docs.google.com/forms/d/e/1FAIpQLSe5qwunkGf6PUvzPirPDtuy1Du5Rlzew23UBp2S-P3wB-GcwQ/viewform) if you have any feedback or suggestions.

近期下载者

相关文件


收藏者