Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C++20 STL Cookbook

You're reading from   C++20 STL Cookbook Leverage the latest features of the STL to solve real-world problems

Arrow left icon
Product type Paperback
Published in May 2022
Publisher Packt
ISBN-13 9781803248714
Length 450 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Bill Weinman Bill Weinman
Author Profile Icon Bill Weinman
Bill Weinman
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Chaper 1: New C++20 Features 2. Chapter 2: General STL Features FREE CHAPTER 3. Chapter 3: STL Containers 4. Chapter 4: Compatible Iterators 5. Chapter 5: Lambda Expressions 6. Chapter 6: STL Algorithms 7. Chapter 7: Strings, Streams, and Formatting 8. Chapter 8: Utility Classes 9. Chapter 9: Concurrency and Parallelism 10. Chapter 10: Using the File System 11. Chapter 11: A Few More Ideas 12. Other Books You May Enjoy

What this book covers

Chaper 1, New C++20 Features, introduces the new STL features in C++20. It aims to familiarize you with the new language features so you may use them with the STL.

Chapter 2, General STL Features, discusses modern STL features added in recent C++ versions.

Chapter 3, STL Containers, covers the STL's comprehensive library of containers.

Chapter 4, Compatible Iterators, shows how to use and create STL-compatible iterators.

Chapter 5, Lambda Expressions, covers the use of lambdas with STL functions and algorithms.

Chapter 6, STL Algorithms, provides recipes for using and creating STL-compatible algorithms.

Chapter 7, Strings, Stream, and Formatting, describes the STL string and formatter classes.

Chapter 8, Utility Classes, covers STL utilities for date-and-time, smart pointers, optionals, and more.

Chapter 9, Concurrency and Parallelism, describes support for concurrency, including threads, async, atomic types, and more.

Chapter 10, Using the File System, covers the std::filesystem classes and how to put them to use with the latest advancements that came out with C++20.

Chapter 11, A Few More Ideas, provides a few more solutions, including a trie class, string split, and more. This provides advanced examples on how to put the STL to use for real-world problems.

The recipes in this book use the GCC compiler

Unless otherwise noted, most of the recipes in this book have been developed and tested using the GCC compiler, version 11.2, the latest stable version as of this writing.

As I write this, C++20 is still new and is not fully implemented on any available compiler. Of the three major compilers, GCC (GNU), MSVC (Microsoft), and Clang (Apple), the MSVC compiler is furthest along in implementing the new standard. Occasionally, we may run into a feature that is implemented on MSVC or another compiler, but not on GCC, in which case I will note which compiler I used. If a feature is not yet implemented on any available compiler, I will explain that I was unable to test it.

I strongly recommend that you install GCC to follow along with the recipes in this book. GCC is freely available under the GNU General Public License (GPL). The easiest way to get the latest version of GCC is to install Debian Linux (also GPL) and use apt with the testing repository.

If you are using the digital version of this book, we suggest you type the code yourself or download the code from the GitHub repository (link in the next section). This will avoid errors due to copying and pasting formatted code from the e-book.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/CPP-20-STL-Cookbook. In the event of updates and errata, code will be updated on the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime