C++20
Content:
I'm proud to present the early release of my book to C++20 on LeanPub. The book is 50 % done and has more than 300 pages and 150 code examples of content. I will update the book at least two times in 2021. Of course, you will get each update of the book.
How to Get it?
Use the link: Leanpub.com: C++20.
What's Inside?
My book C++20 is both: a tutorial and reference to the C++20 standard. It teaches you C++20 and provides you with the details of this new thrilling C++ standard. The thrilling factor is mainly due to the big four of C++20.
- Concepts change the way we think and program templates. They are semantic categories for the template parameters. They enable you to express your intention directly in the type system. If something goes wrong, you get a clear error message.
- The new ranges library enables it to perform algorithms directly on the container, compose the algorithm with the pipe symbol, and apply them onto infinite data streams.
- Thanks to coroutines asynchronous programming in C++ becomes mainstream. Coroutines are the base for cooperative tasks, event loops, infinite data streams, or pipelines.
- Modules overcome the restrictions of header files. They promise a lot. For example, the separation of header and source files becomes as obsolete as the preprocessor. In the end, we have faster built time and an easier way to build packages.
More Details
- Core Language
- Concepts
- Two Wrong Approaches
- Advantages of Concepts
- Usage of Concepts
- Unconstrained Placeholders and Constrained Placeholders
- Abbreviated Function Templates
- Predefined Concepts
- Define Concepts
- Application
- Moduls
- Why do we need modules?
- Advantages
- A First Example
- Compilation and Use
- Modularized Standard Library
- Export
- Guidelines for a Module Structure
- Module Interface Unit and Module Implementation Unit
- Submodules and Module Partitions
- Templates in Modules
- Module Linkage
- Header Units
- Three-Way Comparison Operator
- Ordering before C++20
- Ordering since C++20
- The Compiler-Generated Spaceship Operator
- Rewriting Expressions
- User-Defined and Auto-Generated Comparison Operators
- Designated Initialization
- Aggregate Initialization
- Designated Initialization
consteval
andconstint
consteval
constinit
- Function Execution
- Variable Initialization
- Solving the Static Initialization Order Fiasco
- Template Improvements
- Conditionally Explicit Constructor
- Non-Type Template Parameters
- Lambda Improvements
- Template Parameter for Lambdas
- Detection of the Implicitly Copy of the
this
Pointer - Lambdas in an Unevaluted Context and Stateless Lambdas can be Default-Constructed and Copy-Assigned
- New Attributes
[[nodiscard("reason")]]
[[likely]]
and[[unlikely]]
[[no_unique_address]]
volatile
- Further Improvements
- Range-base for-loop with Initializers
- Virtual
constexpr
function - The new Character Type of UTF-8 Strings:
char8_t
using
enum
in Local Scopes- Default Member Initializers for Bit Fields
- Concepts
- Standard Library
- Ranges Library
- The Concepts Ranges and Views
- Direct on the Container
- Function Composition
- Lazy Evaluation
- A Flavor of Python
std::span
- Create a
std::span
from a Pointer and a Size - Modifying the Referenced Objects
- Addressing its Elements
- Create a
- Container Improvements
constexpr
Container and Algorithmsstd::array
- Consistent Container Erasure
contains
for Associative Containers- String prefix and suffix checking
- Arithmetic Utilities
- Safe Comparison of Integrals
- Mathematical Constants
- Midpoint and Linear Interpolation
- Bit Manipulation
- Calendar and Time-Zone
- Time of day
- Calendar Dates
- Time-Zones
- Formatting Library
- Format String
- User-Defined Types
- Further Improvements
- std::bind_front
std::is_constant_evaluated
std::source_location
- Ranges Library
- Concurrency
- Coroutines
- A Generator Function
- Details
- The Framework
- Atomics
std::atomic_ref
- Atomic Smart Pointer
std::atomic_flag
Extensionsstd::atomic
Extensions
- Semaphores
- Latches and Barriers
std::latch
std::barrier
- Cooperatively Interruption
std::stop_token
,std::stop_source
, andstd::stop_callback
std::jthread
- Automatically Joining
- Interrupt a
std::jthread
- Synchronized Outputstreams
- Coroutines
- C++23 and Beyond
- Coroutines Library
- Modularized Standandard Library for Modules
- Executors
- Network Library
- Contracts
- Reflection
- Pattern Matching
- Tutorials to the big four at least: concepts, ranges, modules, and coroutines.
How to Contact Me?
- If you have any questions to the book, please contact me: Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!.
Kommentare
ich würde gerne wissen, weshalb es auf den Index-Seiten (ab S.609) keine Seitenzahlen zu den angegebenen Wörtern gibt.
Ist das ein Fehler oder soll das so sein.
Grüße, Beate
Alle Kommentare dieses Beitrages als RSS-Feed.