Machine Heart Report
Editor: Chen Ping
C++ is an ancient yet novel language. What new features does modern C++ have? This book will take you through it.
Since its invention, C++ has undergone multiple revisions, each adding new features and making some modifications. Looking back at the history of C++, it took more than a decade of accumulation from the emergence of C++98 to the official finalization of C++11. C++14/17 serves as an important supplement and optimization to C++11, while C++20 has ushered the language into modernization. The features expanded in all these new standards have injected new vitality into C++. Modern C++ (referring to C++11/14/17/20) has made the entire C++ language more modern. Modern C++ not only enhances the usability of the C++ language itself, but also the modification of the auto keyword semantics gives us more confidence in manipulating extremely complex template types. At the same time, it has greatly strengthened the runtime of the language; the emergence of Lambda expressions allows C++ to have the closure characteristics of anonymous functions, a feature that has become commonplace in modern programming languages (such as Python/Swift/…); the introduction of rvalue references addresses the long-standing efficiency issues of temporary objects in C++. This article introduces this book about modern C++. Compared to traditional C++, what new features does modern C++ have?
Target AudienceThis book assumes that the reader is already familiar with traditional C++, and has no difficulty in reading traditional C++ code. In other words, those who have long used traditional C++ for coding and are eager to quickly understand modern C++ features are very suitable for reading this book; this book introduces some black magic of modern C++ to a certain extent, but these magic tricks are limited and not suitable for readers who wish to advance their learning of modern C++. The positioning of this book is a quick start to modern C++. Of course, readers who wish to advance their learning can use this book to review and test their familiarity with modern C++.Book Introduction
This book has both Chinese and English versions, containing 10 chapters. Each chapter includes a large amount of code, and the author has also provided code links, all organized by chapter, with folder names as chapter numbers. Additionally, each chapter ends with a small number of very easy exercises to test whether readers can apply the knowledge points from the current chapter. Similarly, the author has provided links to exercise answers.Chinese version link: https://changkun.de/modern-cpp/pdf/modern-cpp-tutorial-zh-cn.pdfEnglish version link: https://changkun.de/modern-cpp/pdf/modern-cpp-tutorial-en-us.pdfBook code link: https://changkun.de/modern-cpp/code/Exercise answer link: https://changkun.de/modern-cpp/exercises/Chapter Directory
Chapter 1: Mainly introduces the major features deprecated in the C++ standard library since C++11, and also covers the compatibility of C++ with C.Chapter 2: Introduces the enhancement of language usability, mainly covering constants, variables and their initialization, type deduction, control flow, templates, and object-oriented programming.Chapter 3: Strengthening the runtime of the language, mainly introducing Lambda expressions, function object wrappers, and rvalue references.Chapter 4: Briefly introduces the new containers added in modern C++, including linear containers, unordered containers, and tuples. Their usage is similar to the containers already present in traditional C++, relatively simple, allowing selection based on actual scenarios for better performance.Chapter 5: Introduces smart pointers and memory management, including RAII and reference counting, as well as pointers std::shared_ptr, std::unique_ptr, std::weak_ptr.Chapter 6: Briefly introduces regular expressions, then introduces the usage of the regular expression library through a practical example based on the main needs of using regular expressions.Chapter 7: Mainly introduces important tools in concurrent programming, such as <span>std::thread, </span><span>std::mutex, </span><span>std::future</span>. In addition, it introduces one of the most important features of C++11, the “memory model”, which provides an important foundation for C++ in standardizing high-performance computing.Chapter 8: File systems. This library provides functionalities for operating components related to file systems, paths, regular files, directories, etc.Chapter 9: Introduces several features of C++11, including new types, noexcept decorators and operations, literals, and memory alignment. These features are among the most frequently used modern C++ new features, among which <span>noexcept</span> is the most important feature, as it prevents the propagation of exceptions, effectively allowing the compiler to optimize the code to the maximum extent.Chapter 10: Looks forward to C++20. Currently, this book has been launched on GitHub and has quickly gained 7.1k stars. The latest update was on October 3, 2020, and there may be new content updates afterward. For the latest content, please check GitHub: https://github.com/changkun/modern-cpp-tutorial
Author IntroductionThe author of this book, Ou Changkun, studied computer science at Southwest Minzu University in 2012; in 2015, as an exchange student, he came to Germany to study human-computer interaction (HCI); in 2016, he obtained a bachelor’s degree in engineering and entered LMU Munich to pursue a master’s degree in HCI; in 2018, he studied at LMU Munich and obtained a master’s degree in computer science parallel to HCI; in 2019, he obtained a master’s degree in science with parallel degrees in human-computer interaction and computer science and began working as a research assistant for a PhD student at LMU Munich. His main research directions include computer graphics, machine learning, systems programming, and human-computer interaction, and he is proficient in programming languages such as C++, JavaScript, and Python. His published academic research includes:
Reference Link: https://changkun.de/modern-cpp/From Algorithms to Applications, Introduction to Voiceprint Technology.
On October 19, the first lecture: Audio Basics and Voiceprint Recognition. Google senior software engineer and head of the voiceprint recognition and language recognition team, Wang Quan, will introduce the basic knowledge related to voiceprint recognition technology, including the development history, auditory perception, and basic concepts and methods related to audio processing, as well as the core application of voiceprint recognition in the field of voiceprint.
Add the Machine Heart Assistant (syncedai5), note “voiceprint”, and join the group to watch the live broadcast together.

© THE END
For reprints, please contact this public account for authorization
Submission or seeking reports: [email protected]