- Modern C++ Programming Cookbook
- Marius Bancila
- 471字
- 2021-06-11 18:22:11
Preface
C++ is one of the most popular and most widely used programming languages, and it has been like that for three decades. Designed with a focus on performance, efficiency, and flexibility, C++ combines paradigms such as object-oriented, imperative, generic, and functional programming. C++ is standardized by the International Organization for Standardization (ISO) and has undergone massive changes over the last decade. With the standardization of C++11, the language has entered into a new age, which has been widely referred to as modern C++. Type inference, move semantics, lambda expressions, smart pointers, uniform initialization, variadic templates, and many other recent features have changed the way we write code in C++ to the point that it almost looks like a new programming language. This change is being further advanced with the release of the C++20 standard that is supposed to happen during 2020. The new standard includes many new changes to the language, such as modules, concepts, and coroutines, as well as to the standard library, such as ranges, text formatting, and calendars.
This book addresses many of the new features included in C++11, C++14, C++17, and the forthcoming C++20. This book is organized in recipes, each covering one particular language or library feature, or a common problem that developers face and its typical solution using modern C++. Through more than 130 recipes, you will learn to master both core language features and the standard libraries, including those for strings, containers, algorithms, iterators, streams, regular expressions, threads, filesystem, atomic operations, utilities, and ranges.
This second edition of the book took several months to write, and during this time the work on the C++20 standard has been completed. However, at the time of writing this preface, the standard is yet to be approved and will be published later this year.
More than 30 new or updated recipes in this book cover C++20 features, including modules, concepts, coroutines, ranges, threads and synchronization mechanisms, text formatting, calendars and time zones, immediate functions, the three-way comparison operator, and the new span class.
All the recipes in the book contain code samples that show how to use a feature or how to solve a problem. These code samples have been written using Visual Studio 2019, but have been also compiled using Clang and GCC. Since the support for various language and library features has been gradually added to all these compilers, it is recommended that you use the latest version to ensure that all of them are supported. At the time of writing this preface, the latest versions are GCC 10.1, Clang 12.0 (in progress), and VC++ 2019 version 14.27 (from Visual Studio 2019 version 16.7). Although all these compilers are C++17 complete, the support for C++20 varies from compiler to compiler. Please refer to https://en.cppreference.com/w/cpp/compiler_support to check your compiler's support for C++20 features.
- 工程軟件開發(fā)技術(shù)基礎(chǔ)
- Oracle數(shù)據(jù)庫從入門到運(yùn)維實(shí)戰(zhàn)
- C語言程序設(shè)計(jì)案例精粹
- 小程序開發(fā)原理與實(shí)戰(zhàn)
- 精通Linux(第2版)
- Create React App 2 Quick Start Guide
- OpenResty完全開發(fā)指南:構(gòu)建百萬級(jí)別并發(fā)的Web應(yīng)用
- 快速入門與進(jìn)階:Creo 4·0全實(shí)例精講
- 代替VBA!用Python輕松實(shí)現(xiàn)Excel編程
- 零基礎(chǔ)輕松學(xué)C++:青少年趣味編程(全彩版)
- Apache Kafka 1.0 Cookbook
- Mastering Citrix? XenDesktop?
- Ajax與jQuery程序設(shè)計(jì)
- C#.NET程序設(shè)計(jì)
- Visual FoxPro程序設(shè)計(jì)(第二版)