Rainer Grimm - C++20
Here you can read online Rainer Grimm - C++20 full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2020, publisher: leanpub.com, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:
Romance novel
Science fiction
Adventure
Detective
Science
History
Home and family
Prose
Art
Politics
Computer
Non-fiction
Religion
Business
Children
Humor
Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.
- Book:C++20
- Author:
- Publisher:leanpub.com
- Genre:
- Year:2020
- Rating:5 / 5
- Favourites:Add to favourites
- Your mark:
- 100
- 1
- 2
- 3
- 4
- 5
C++20: summary, description and annotation
We offer to read an annotation, description, summary or preface (depends on what the author of the book "C++20" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.
C++20 — read online for free the complete book (whole text) full work
Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "C++20" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.
Font size:
Interval:
Bookmark:
This book is for sale at http://leanpub.com/c20
This version was published on 2021-05-11
* * * * *
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.
* * * * *
Sandor Dargo
Senior Software Development Engineer at Amadeus
Adrian Tam
Director of Data Science, Synechron Inc.
My book C++20 is both a tutorial and a reference. It teaches you C++20 and provides you with the details of this new thrilling C++ standard. The thrill factor is mainly due to the big four of C++20:
- Concepts change the way we think about and program with templates. They are semantic categories for template parameters. They enable you to express your intention directly in the type system. If something goes wrong, the compiler gives you a clear error message.
- 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 build times and an easier way to build packages.
- The new ranges library supports performing algorithms directly on the containers, composing algorithms with the pipe symbol, and applying algorithms lazily on infinite data streams.
- Thanks to coroutines, asynchronous programming in C++ becomes mainstream. Coroutines are the basis for cooperative tasks, event loops, infinite data streams, or pipelines.
Of course, this is not the end of the story. Here are more C++20 features:
- Auto-generated comparison operators
- Calendar and time-zone libraries
- Format library
- Views on contiguous memory blocks
- Improved, interruptible threads
- Atomic smart pointers
- Semaphores
- Coordination primitives such as latches and barriers
Here are only a few conventions.
Italic: I use Italic to emphasize a quote.
Bold: I use Bold to emphasize a name.
Monospace
: I use Monospace
for code, instructions, keywords, and names of types, variables, functions, and classes.
Boxes contain background tips, warnings, and distilled information.
This box provides additional information about the presented material and tips for compiling the programs.
Warning boxes should help you to avoid pitfalls.
This box summarizes at the end of each main section the important things to remember.
The source code examplesstarting with the details partshown in the book are complete. That means, assuming you have a conforming compiler, you can compile and run them. I put the name of the source file in the title of each source code example. The source code uses four whitespaces for indentation. Only for layout reasons, I sometimes use two whitespaces.
Furthermore, Im not a fan of namespace directives such as using namespace std
because they make the code more difficult to read and can pollute namespaces. Consequently, I use them only when it improves the codes readability (e.g.: using namespaces std::chrono_literals
). When necessary for layout reasons, I apply a using
-declaration, such as using std::chrono::system_clock
.
To summarize, I only use the following layout rules if necessary:
- I indent two characters instead of four.
- I apply the
using namespace std
directive.
As the C++20 standard is brand-new, many examples can only be compiled and executed with a specific compiler. I use the newest GCC, Clang, and MSVC compilers. When you compile the program, you must specify the applied C++ standard. This means, with GCC or Clang you must provide the flag -std=c++20
, and with MSVC /std:c++latest
. When using concurrency features, unlike with MSVC, the GCC and Clang compilers require that you link the pthread library using -pthread
.
If you dont have an appropriate C++ compiler at your disposal, use an online compiler such as Wandbox or Compiler Explorer. When you use Compiler Explorer with GCC or Clang, you can also execute the program. First, you have to enable Run the compiled output
(1) and, second, open the Output
window (2).
You can get more details about the C++20 conformity of various C++ compilers at cppreference.com.
If you are not familiar with C++20, start at the very beginning with to get the big picture.
Once you get the big picture, you can proceed with the chapter.
I started a request for proofreading on my English blog: ModernesCpp Cpp and received more responses than I expected. Special thanks to all of you. Here are the names of the proofreaders in alphabetic order: Bob Bird, Nicola Bombace, Dave Burchill, Sandor Dargo, James Drobina, Frank Grimm, Kilian Henneberger, Ivan espkk Kondakov, Pter Kardos, Rakesh Mane, Jonathan OConnor, John Plaice, Iwan Smith, Paul Targosz, Steve Vinoski, and Greg Wagner.
Special thanks also to my daughter Juliette, and my wife Beatrix. Juliette improved my wording and fixed many of my typos. Beatrix created Cippi and illustrated the book.
Font size:
Interval:
Bookmark:
Similar books «C++20»
Look at similar books to C++20. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.
Discussion, reviews of the book C++20 and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.