{"id":6054,"date":"2020-12-17T09:00:34","date_gmt":"2020-12-17T09:00:34","guid":{"rendered":"https:\/\/www.modernescpp.com\/index.php\/i-m-proud-to-present-c-20\/"},"modified":"2020-12-17T09:00:34","modified_gmt":"2020-12-17T09:00:34","slug":"i-m-proud-to-present-c-20","status":"publish","type":"post","link":"https:\/\/www.modernescpp.com\/index.php\/i-m-proud-to-present-c-20\/","title":{"rendered":"I&#8217;m Proud to Present my New Book: C++20"},"content":{"rendered":"<p>I&#8217;m proud to present the early release of my book to<a href=\"https:\/\/leanpub.com\/c20\"> C++20 on LeanPub<\/a>. 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.<\/p>\n<p><!--more--><\/p>\n<p><a href=\"https:\/\/leanpub.com\/c20\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-6043\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2020\/12\/coverCpp20.jpg\" alt=\"C++20\" width=\"500\" height=\"556\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/a><\/p>\n<h2>How to Get it?<\/h2>\n<p>Use the link: <a href=\"https:\/\/leanpub.com\/c20\">Leanpub.com: C++20<\/a><\/p>\n<h2>What&#8217;s Inside?<\/h2>\n<p>My book C++20 is both: a tutorial and a reference to the C++20 standard.<strong> It teaches you C++20 and provides you with the details of this new thrilling C++ standard.<\/strong> The thrilling factor is mainly due to the big four of C++20.<\/p>\n<ul>\n<li><strong>Concepts<\/strong> 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 of system. If something goes wrong, you get a clear error message.<\/li>\n<li>The new <strong>ranges library<\/strong> enables it to perform algorithms directly on the container, compose the algorithm with the pipe symbol, and apply them onto infinite data streams.<\/li>\n<li>Thanks to <strong>coroutines<\/strong> asynchronous programming in C++ becomes mainstream. Coroutines are the base for cooperative tasks, event loops, infinite data streams, or pipelines.<\/li>\n<li><strong>Modules<\/strong> 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.<\/li>\n<\/ul>\n<h2>More Details<\/h2>\n<p>&nbsp;<\/p>\n<ul>\n<li>Core Language\n<ul>\n<li>Concepts\n<ul>\n<li>Two Wrong Approaches<\/li>\n<li>Advantages of Concepts<\/li>\n<li>Usage of Concepts<\/li>\n<li>Unconstrained Placeholders and Constrained Placeholders<\/li>\n<li>Abbreviated Function Templates<\/li>\n<li>Predefined Concepts<\/li>\n<li>Define Concepts<\/li>\n<li>Application<\/li>\n<\/ul>\n<\/li>\n<li>Moduls\n<ul>\n<li>Why do we need modules?<\/li>\n<li>Advantages<\/li>\n<li>A First Example<\/li>\n<li>Compilation and Use<\/li>\n<li>Modularized Standard Library<\/li>\n<li>Export<\/li>\n<li>Guidelines for a Module Structure<\/li>\n<li>Module Interface Unit and Module Implementation Unit<\/li>\n<li>Submodules and Module Partitions<\/li>\n<li>Templates in Modules<\/li>\n<li>Module Linkage<\/li>\n<li>Header Units<\/li>\n<\/ul>\n<\/li>\n<li>Three-Way Comparison Operator\n<ul>\n<li>Ordering before C++20<\/li>\n<li>Ordering since C++20<\/li>\n<li>The Compiler-Generated Spaceship Operator<\/li>\n<li>Rewriting Expressions<\/li>\n<li>User-Defined and Auto-Generated Comparison Operators<\/li>\n<\/ul>\n<\/li>\n<li>Designated Initialization\n<ul>\n<li>Aggregate Initialization<\/li>\n<li>Designated Initialization<\/li>\n<\/ul>\n<\/li>\n<li><code>consteval<\/code> and <code>constint<\/code>\n<ul>\n<li><code>consteval<\/code><\/li>\n<li><code>constinit<\/code><\/li>\n<li>Function Execution<\/li>\n<li>Variable Initialization<\/li>\n<li>Solving the Static Initialization Order Fiasco<\/li>\n<\/ul>\n<\/li>\n<li>Template Improvements\n<ul>\n<li>Conditionally Explicit Constructor<\/li>\n<li>Non-Type Template Parameters<\/li>\n<\/ul>\n<\/li>\n<li>Lambda Improvements\n<ul>\n<li>Template Parameter for Lambdas<\/li>\n<li>Detection of the Implicitly Copy of the <code>this<\/code> Pointer<\/li>\n<li>Lambdas in an Unevaluted Context and Stateless Lambdas can be Default-Constructed and Copy-Assigned<\/li>\n<\/ul>\n<\/li>\n<li>New Attributes\n<ul>\n<li><code>[[nodiscard(\"reason\")]]<\/code><\/li>\n<li><code>[[likely]]<\/code> and <code>[[unlikely]]<\/code><\/li>\n<li><code>[[no_unique_address]]<\/code><\/li>\n<\/ul>\n<\/li>\n<li><code>volatile<\/code><\/li>\n<li>Further Improvements\n<ul>\n<li>Range-base for-loop with Initializers<\/li>\n<li>Virtual <code>constexpr<\/code> function<\/li>\n<li>The new Character Type of UTF-8 Strings: <code>char8_t<\/code><\/li>\n<li><code>using<\/code> <code>enum<\/code> in Local Scopes<\/li>\n<li>Default Member Initializers for Bit Fields<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Standard Library\n<ul>\n<li>Ranges Library\n<ul>\n<li>The Concepts Ranges and Views<\/li>\n<li>Direct on the Container<\/li>\n<li>Function Composition<\/li>\n<li>Lazy Evaluation<\/li>\n<li>A Flavor of Python<\/li>\n<\/ul>\n<\/li>\n<li><code>std::span<\/code>\n<ul>\n<li>Create a <code>std::span<\/code> from a Pointer and a Size<\/li>\n<li>Modifying the Referenced Objects<\/li>\n<li>Addressing its Elements<\/li>\n<\/ul>\n<\/li>\n<li>Container Improvements\n<ul>\n<li><code>constexpr<\/code> Container and Algorithms<\/li>\n<li><code>std::array<\/code><\/li>\n<li>Consistent Container Erasure<\/li>\n<li><code>contains<\/code> for Associative Containers<\/li>\n<li>String prefix and suffix checking<\/li>\n<\/ul>\n<\/li>\n<li>Arithmetic Utilities\n<ul>\n<li>Safe Comparison of Integrals<\/li>\n<li>Mathematical Constants<\/li>\n<li>Midpoint and Linear Interpolation<\/li>\n<li>Bit Manipulation<\/li>\n<\/ul>\n<\/li>\n<li>Calendar and Time-Zone\n<ul>\n<li>Time of day<\/li>\n<li>Calendar Dates<\/li>\n<li>Time-Zones<\/li>\n<\/ul>\n<\/li>\n<li>Formatting Library\n<ul>\n<li>Format String<\/li>\n<li>User-Defined Types<\/li>\n<\/ul>\n<\/li>\n<li>Further Improvements\n<ul>\n<li>std::bind_front<\/li>\n<li><code>std::is_constant_evaluated<\/code><\/li>\n<li><code>std::source_location<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Concurrency\n<ul>\n<li>Coroutines\n<ul>\n<li>A Generator Function<\/li>\n<li>Details<\/li>\n<li>The Framework<\/li>\n<\/ul>\n<\/li>\n<li>Atomics\n<ul>\n<li><code>std::atomic_ref<\/code><\/li>\n<li>Atomic Smart Pointer<\/li>\n<li><code>std::atomic_flag<\/code> Extensions<\/li>\n<li><code>std::atomic<\/code> Extensions<\/li>\n<\/ul>\n<\/li>\n<li>Semaphores<\/li>\n<li>Latches and Barriers\n<ul>\n<li><code>std::latch<\/code><\/li>\n<li><code>std::barrier<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Cooperatively Interruption\n<ul>\n<li><code>std::stop_token<\/code>, <code>std::stop_source<\/code>, and <code>std::stop_callback<\/code><\/li>\n<\/ul>\n<\/li>\n<li><code>std::jthread<\/code>\n<ul>\n<li>Automatically Joining<\/li>\n<li>Interrupt a <code>std::jthread<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Synchronized Outputstreams<\/li>\n<\/ul>\n<\/li>\n<li>C++23 and Beyond\n<ul>\n<li>Coroutines Library<\/li>\n<li>Modularized Standandard Library for Modules<\/li>\n<li>Executors<\/li>\n<li>Network Library<\/li>\n<li>Contracts<\/li>\n<li>Reflection<\/li>\n<li>Pattern Matching<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>State of the Book<\/h2>\n<h3>Early Publishing<\/h3>\n<p>Although the book is only 50 % done, I publish it at LeanPub. I will update the book at least two times and assume that I&#8217;m done with the book in about a year. I decided to publish it half-done because it provides valuable information even in this early stage.<\/p>\n<h3>Further Updates<\/h3>\n<p>You can expect the following improvements with future updates.<\/p>\n<ul>\n<li>More code examples when missing C++20 features are available. Additionally, I reimplement existing examples using the C++20 standard and not prototype libraries such as <a href=\"https:\/\/github.com\/fmtlib\/fmt\">fmt<\/a> or <a href=\"https:\/\/github.com\/HowardHinnant\/date\">date<\/a>.<\/li>\n<li>More details on the C++20 features.<\/li>\n<li>A preview of the new C++23 standard.<\/li>\n<li>Tutorials to the big four at least: concepts, ranges, modules, and coroutines.<\/li>\n<\/ul>\n<h2 id=\"h1-7-how-to-contact-me\">How to Contact Me?<\/h2>\n<ul>\n<li>If you have any questions to the book, please contact me: <a href=\"mailto:Rainer.Grimm@ModernesCpp.de\">Rainer.Grimm@ModernesCpp.de<\/a>.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Modernes C++,<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4721\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2016\/04\/RainerGrimmSmall.png\" alt=\"RainerGrimmSmall\" style=\"margin: 15px;\" width=\"222\" height=\"66\" \/><span id=\"transmark\"><\/span><\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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.<\/p>\n","protected":false},"author":21,"featured_media":6043,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[360],"tags":[],"class_list":["post-6054","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts\/6054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/comments?post=6054"}],"version-history":[{"count":0,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts\/6054\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/media\/6043"}],"wp:attachment":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/media?parent=6054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/categories?post=6054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/tags?post=6054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}