Explore the latest language and library features of C++20 such as modules, coroutines, concepts, and ranges
Shed new light on the core concepts in C++ programming, including functions, algorithms, threading, and concurrency, through practical self-contained recipes
Leverage C++ features like smart pointers, move semantics, constexpr, and more for increased robustness and performance
Description
C++ has come a long way to be one of the most widely used general-purpose languages that is fast, efficient, and high-performance at its core.
The updated second edition of Modern C++ Programming Cookbook addresses the latest features of C++20, such as modules, concepts, coroutines, and the many additions to the standard library, including ranges and text formatting. The book is organized in the form of practical recipes covering a wide range of problems faced by modern developers.
The book also delves into the details of all the core concepts in modern C++ programming, such as functions and classes, iterators and algorithms, streams and the file system, threading and concurrency, smart pointers and move semantics, and many others. It goes into the performance aspects of programming in depth, teaching developers how to write fast and lean code with the help of best practices.
Furthermore, the book explores useful patterns and delves into the implementation of many idioms, including pimpl, named parameter, and attorney-client, teaching techniques such as avoiding repetition with the factory pattern. There is also a chapter dedicated to unit testing, where you are introduced to three of the most widely used libraries for C++: Boost.Test, Google Test, and Catch2.
By the end of the book, you will be able to effectively leverage the features and techniques of C++11/14/17/20 programming to enhance the performance, scalability, and efficiency of your applications.
Who is this book for?
The book is designed for entry- or medium-level C++ programmers who have a basic knowledge of C++ and want to master the language and become prolific modern C++ developers. Experienced C++ programmers can leverage this book to strengthen their command of C++ and find a good reference to many language and library features of C++11/14/17/20.
What you will learn
Understand the new C++20 language and library features and the problems they solve
Become skilled at using the standard support for threading and concurrency for daily tasks
Leverage the standard library and work with containers, algorithms, and iterators
Solve text searching and replacement problems using regular expressions
Work with different types of strings and learn the various aspects of compilation
Take advantage of the file system library to work with files and directories
Implement various useful patterns and idioms
Explore the widely used testing frameworks for C++
I have been using C++ since the mid 80s but until recently I was still using Visual C++ 6.0 (1997). That's right, I was a dinosaur but I got what I needed from 3rd party libraries such as Tcl/Tk. This cookbook is the fastest way to bring yourself up to date without having to start over with a full C++ reference or user manual. Nip in to the new feature you want to check out and enter the 21st century. It's no-nonsense coverage of any topic is great for the experienced but almost extinct dinosaur.
Amazon Verified review
The DudeMar 08, 2022
3
I needed a book to bring me up-to-date with C++ and a reference book for all the features (and especially syntax) in C++ and this is not that book. I found that "Professional C++" by Marc Gregoire, was exactly what I was looking for.I now recognize that with "Cookbook" in its title, that my expecting it to also cover everything in C++ was expecting too much. I was also put off by the "feel" of this $50 book- the paper is thick and rough and fluffs this ~800 page book out so that it's thicker than Pro C++'s ~1,300 pages! And the content on each page uses large fonts and line spacing so that Pro C++ probably gets 50% more info on each page. I really don't like seeing this kind of thing being done to try to convince me that this is a really worth $50. It makes me also wonder about the content, but it sounds from other reviews that it is actually a good "cookbook". I was
Amazon Verified review
AlGrenadineAug 15, 2021
5
I loved reading this book. It's clear, very exhaustive, and got me updated to the new c++20 ways of coding.And the very practical index makes it a reference for future needs.I'll definitely try to force my coworkers to buy and read it ^^
Amazon Verified review
vishal kaushikJun 13, 2021
5
I was given the privilege to review this book by one of my friend and ai would like to admit this is one of the best book I have come across recently on modern C++.This book is definitely not for beginners but if you have few years of experience with modern c++ and trying to learn to best utilize the c++ modern features , you will start loving this book after reading first chapter two chapters itself.I love the recipes given in this book to explain modern c++ concepts like pimpl and named parameters and attorney client with factory pattern. These are just few examples but the book contains really good recipes to utilize modern language features.I really appreciate the author to also include testing frameworks like google test and boost test since unit testing your code is another important factor in any language.I would highly recommend this book to users who are looking to learn and implement modern c++ features in their projects , i am sure this book will tremendously help in that.
Marius Bancila is a software engineer with two decades of experience in developing solutions for line of business applications and more. He is the author of The Modern C++ Challenge and Template Metaprogramming with C++. He works as a software architect and is focused on Microsoft technologies, mainly developing desktop applications with C++ and C#. He is passionate about sharing his technical expertise with others and, for that reason, he has been recognized as a Microsoft MVP for C++ and later developer technologies since 2006. Marius lives in Romania and is active in various online communities.
Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.
If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.
Please Note: Packt eBooks are non-returnable and non-refundable.
Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:
You may make copies of your eBook for your own use onto any machine
You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website?
If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:
Register on our website using your email address and the password.
Search for the title by name or ISBN using the search option.
Select the title you want to purchase.
Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title.
Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook?
If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
To view your account details or to download a new copy of the book go to www.packtpub.com/account
Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.
You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.
What are the benefits of eBooks?
You can get the information you need immediately
You can easily take them with you on a laptop
You can download them an unlimited number of times
You can print them out
They are copy-paste enabled
They are searchable
There is no password protection
They are lower price than print
They save resources and space
What is an eBook?
Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.
When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.
For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.