Price: $54.99 - $41.37
(as of Sep 18, 2024 09:31:58 UTC – Details)
Meta Description: With a wealth of practical recipes, this third edition isn’t just a guide to C++23; it’s a complete resource covering key features and techniques from C++11 through to C++23. It’s designed to keep you ahead of the curve in C++.
Key FeaturesFully updated and packed with new recipes, including sync output streams, expected and mdspan, and C++20/23 range adaptorsCovers all significant features from all modern versions of the standard, providing comprehensive insights into modern C++Learn through a series of hands-on, self-contained recipesPurchase of the print or Kindle book includes a free eBook in PDF formatBook Description
The updated third edition of Modern C++ Programming Cookbook addresses the latest features of C++23, such as the stack library, the expected and mdspan types, span buffers, formatting library improvements, and updates to the ranges library. It also gets into more C++20 topics not previously covered, such as sync output streams and source_location
The book is organized into practical recipes covering a wide range of real-world problems, helping you find the solutions you need quickly. You’ll find coverage of all the core concepts of modern C++ programming and features and techniques from C++11 through to C++23, meaning you’ll stay ahead of the curve by learning to incorporate the newest language and library improvements
Beyond the core concepts and new features, you’ll explore recipes related to performance and best practices, how to implement useful patterns and idioms, like pimpl, named parameter, attorney-client, and the factory pattern, and how to complete unit testing with the widely used C++ libraries: Boost.Test, Google Test, and Catch2
With the comprehensive coverage this C++ programming guide offers, by the end of the book you’ll have everything you need to build performant, scalable, and efficient applications in C++.
What you will learnExplore the new C++23 language and library featuresGo deep into the most useful C++20 featuresLearn to handle threading and concurrency for better performanceSolve complex string manipulation tasks efficiently with regexLeverage the standard library for faster developmentMaster the file system library to work with files and directoriesWork with different types of strings and understand compilationSee how you can use CRTP, mixins and other patterns in C++Who this book is for
This book is designed for entry- and intermediate-level programmers who already have a foundational understanding of the C++ programming language, but who are looking to master the language, implement the newest features, and become proficient modern C++ developers. Experienced C++ programmers can leverage the recipes in this book to quickly get up to speed on all the most important language and library features of C++11/14/17/20 and 23.
Table of ContentsLearning Modern Core Language FeaturesWorking with Numbers and StringsExploring FunctionsPreprocessing and CompilationStandard Library Containers, Algorithms, and IteratorsGeneral-Purpose UtilitiesWorking with Files and Streams Leveraging Threading and Concurrency Robustness and PerformanceImplementing Patterns and IdiomsExploring Testing FrameworksC++23 Features
From the Publisher
What’s changed in C++ since the last edition of this book came out, and what’s changed in the book to help developers work with those changes?
The second edition of the book was published in late 2020. Since then, a new version of the standard has been developed. Although it will only be finally published in 2024, this version is known as C++23. Perhaps not a version as large as C++20, C++23 still offers a multitude of improvements and new features, both for the language and the standard library. In the new edition, readers can look forward to learning about span buffers, the stack trace library, the std::mdspan type, the std::expected type, and the multidimensional subscript operator. All of these and more are covered across 15 new and updated recipes. With a total of 23 new recipes and other improved ones, this edition explores the latest version of the standard but also includes more C++20 topics not previously covered.
C++ programming is a very broad subject, how did you decide which topics to cover and what to leave out?
Indeed, C++ is a multi-paradigm programming language with many features. It comes with a standard library that allows developers to use out-of-the box utilities (without resorting to third-party libraries or reinventing the wheel). The selection of topics was made to include all the important areas that developers come across, such as handling of strings and numeric types, lambdas and function templates, compilation, containers, algorithms, iterators, files and streams, time and dates, threads and synchronization mechanisms, and many other topics. Moreover, I also included a selection of patterns and idioms, as well as several unit testing frameworks to help developers learn not only how to write code but also how to ensure it does the right thing.
What was your aim when creating this book, and what will readers be able to do once they’ve read it?
When I started with this book 7 years ago, I wanted to present a different approach to teaching C++, with an emphasis on the new, modern way of using the language. I wanted it to be simple to read but to cover a broad range of topics of varying complexity, both for beginners and more experienced C++ programmers. With the second and third edition, the focus was on covering the new, at the time, C++20 and C++23 standards, respectively.
After finishing this book, readers will be able to master the language in all its areas and write high-quality C++ code. Moreover, in the third edition, I am particularly excited to share the recipes covering std::expected, std::mdspan, and std::optional types in chapter 6, as well as several new ones covering the ranges library from chapter 12.
How does your book stand out from all the other C++ books out there?
The idea of a cookbook is to present developers with recipes that propose solutions to challenges that they regularly face. This book is a collection of over 150 such recipes that cover a multitude of topics and solutions using language and library features from C++11/14/17/20/23. The updates in the second and the third edition are focused on the C++20 and C++23 standards, respectively. Developers can not only use the book as a reference to many of the modern C++ language and library features but also as a guide to solving various programming tasks.
Publisher : Packt Publishing; 3rd ed. edition (February 29, 2024)
Language : English
Paperback : 816 pages
ISBN-10 : 1835080545
ISBN-13 : 978-1835080542
Item Weight : 3.08 pounds
Dimensions : 1.72 x 7.5 x 9.5 inches