- Expert C++
- Vardan Grigoryan Shunguang Wu
- 241字
- 2021-06-24 16:33:52
More C++20 features
C++20 is a new big release of the C++ language. It contains many features that make the language more complex and flexible. Concepts, ranges, and coroutines are some of the many features that will be discussed throughout the book.
One of the most anticipated features is modules, which provide the ability to declare modules and export types and values within those modules. You can consider modules an improved version of header files with the now redundant include-guards. We'll cover C++20 modules in this chapter.
Besides notable features added in C++20, there is a list of other features that we will discuss throughout the book:
- The spaceship operator: operator<=>(). The verbosity of operator overloading can now be controlled by leveraging operator<=>().
- constexpr conquers more and more space in the language. C++20 now has the consteval function, constexpr std::vector and std::string, and many more.
- Math constants, such as std::number::pi and std::number::log2e.
- Major updates to the Thread library, including stop tokens and joining threads.
- The iterator concepts.
- Move-only views and other features.
To better understand some new features and also dive into the essence of the language, we will introduce the language's core starting from previous versions. This will help us to find better uses for new features compared to older ones, and will also help in supporting legacy C++ code. Let's now start by gaining an understanding of the C++ application building-process.
- 數據庫原理及應用(Access版)第3版
- DevOps for Networking
- 零基礎學Scratch少兒編程:小學課本中的Scratch創意編程
- Python自動化運維快速入門(第2版)
- 深入理解Django:框架內幕與實現原理
- Python語言程序設計
- SQL Server 2016數據庫應用與開發
- Android開發:從0到1 (清華開發者書庫)
- Android系統級深入開發
- 細說Python編程:從入門到科學計算
- Python Interviews
- Python入門很輕松(微課超值版)
- Qt5 C++ GUI Programming Cookbook
- 從“1”開始3D編程
- Learning D3.js 5 Mapping(Second Edition)