Leanpub Header

Skip to main content

The C++ Standard Library

What every professional C++ programmer should know about the C++ standard library.

With the current C++23 standard, C++ has many libraries to offer. My book's key idea is to give you concise the necessary information for all C++ standard libraries.

The book is an improved version of my German book C++ Standardbibliothek published by O'Reilly.

Persian version

This book is available in multiple packages!

Pick Your Package
PDF
EPUB
WEB
1,139
Readers
351
Pages
About

About

About the Book

"The C++ Standard Library" provides a detailed overview of the C++ Standard Library, including C++23.

The Goal

The C++ Standard Library aims to provide a concise reference of the C++ standard library in about 350 pages. This book assumes that you are familiar with C++. If so, you will get the most benefit from this book. If C++ is new to you, you should start with a textbook about core C++. Once you have mastered a textbook about the core language, you can make your next big step by reading my book.

This book also has more than 150 running code examples for the code snippets I present. Therefore, you can combine theory with practice and get the most out of it.

Many Thanks

In particular, I thank the English proofreaders of my book: Mahesh Attarde, Rick Audet, Pete Barrow, Michael Ben-David, Dave Burns, Alvaro Fernandez, Juliette Grimm, Marius Grimm, George Haake, Nicola Jaud-Stoll, Clare Macrae, Arne Mertz, Ian Reeve, Jason Turner, Bart Vandewoestyne, Ivan Vergiliev, and Andrzej Warzynski. They translated my Swabian English into English. Without their work, the book wouldn't have been possible.

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

The Book

Minimum price

Suggested price$24.00

$20.00

    The C++ Standard Library Team Edition: Five Copies

    Minimum price

    Suggested price$72.00

    Get five copies to the price of three. This package includes all code examples.

    $60.00

      Author

      About the Author

      Rainer Grimm

      I've worked as a software architect, team lead, and instructor since 1999. In 2002, I created a further education round at my company. I have given training courses since 2002. My first tutorials were about proprietary management software, but soon after, I began teaching Python and C++. In my spare time, I like to write articles about C++, Python, and Haskell. I also like to speak at conferences. I publish weekly on my English blog https://www.modernescpp.com.

      Since 2016, I have been an independent instructor giving seminars about modern C++ and Python. I have published several books in various languages about modern C++ and in particular, concurrency. Due to my profession, I always search for the best way to teach modern C++.

      My books "C++ 11 für Programmierer ", "C++" and "C++ Standardbibliothek kurz & gut" for the "kurz & gut" series were published by Pearson and O'Reilly. They are available in German, English, Korean, and Persian. In summer 2018 I published a new book on Leanpub: "Concurrency with Modern C++". This book is also available in German: "Modernes C++: Concurrency meistern".

      Translations

      Translations

      Languages

      Contents

      Table of Contents

      Reader Testimonials

      1. English Edition
      2. German Edition

      Introduction

      1. Purpose of this Book
      2. Index
      3. Conventions
      4. Source Examples
      5. Source Code
      6. Value versus Object
      7. Acknowledgments
      8. Further Information
      9. Cippi
      10. About Me

      1.The Standard Library

      1. The History
      2. Overview
      3. Use of Libraries

      2.Utilities

      1. Useful Functions
      2. Adaptors for Functions
      3. Pairs
      4. Tuples
      5. Reference Wrappers
      6. Smart Pointers
      7. Type Traits
      8. Time Library
      9. std::any, std::optional, and std::variant
      10. std::expected

      3.Interface of All Containers

      1. Create and delete
      2. Size
      3. Access
      4. Assign and Swap
      5. Compare
      6. Erasure

      4.Sequence Containers

      1. Arrays
      2. Vectors
      3. Deques
      4. Lists
      5. Forward Lists

      5.Associative Containers

      1. Overview
      2. Ordered Associative Containers
      3. Unordered Associative Containers

      6.Container Adaptors

      1. Linear Containers
      2. Associative Containers

      7.Views

      1. Contiguous Access
      2. Multidimensional Access

      8.Iterators

      1. Categories
      2. Iterator Creation
      3. Useful Functions
      4. Adaptors

      9.Callable Units

      1. Functions
      2. Function Objects
      3. Lambda Functions

      10.Algorithms

      1. Conventions
      2. Iterators are the Glue
      3. Sequential, Parallel, or Parallel Execution with Vectorisation
      4. for_each
      5. Non-Modifying Algorithms
      6. Modifying Algorithms
      7. Partition
      8. Sort
      9. Binary Search
      10. Merge Operations
      11. Heaps
      12. Min and Max
      13. Permutations
      14. Numeric
      15. Unitialized Memory

      11.Ranges

      1. Range
      2. View
      3. Range Adaptors
      4. Direct on the Containers
      5. Function Composition
      6. Lazy Evaluation
      7. std Algorithms versus std::ranges Algorithms

      12.Numeric

      1. Random Numbers
      2. Numeric Functions Inherited from C
      3. Mathematical Constants

      13.Strings

      1. Create and Delete
      2. Conversion Between C++ and C Strings
      3. Size versus Capacity
      4. Comparison
      5. String Concatenation
      6. Element Access
      7. Input and Output
      8. Search
      9. Check for a substring
      10. Modifying Operations
      11. Numeric Conversions

      14.String Views

      1. Create and Initialise
      2. Non-modifying operations
      3. Modifying operations

      15.Regular Expressions

      1. Character Types
      2. Regular Expression Objects
      3. The Search Result match_results
      4. Match
      5. Search
      6. Replace
      7. Format
      8. Repeated Search

      16.Input and Output Streams

      1. Hierarchy
      2. Input and Output Functions
      3. Streams
      4. User-defined Data Types

      17.Formatting Library

      1. Formatting Functions
      2. Syntax
      3. Format specification
      4. User-defined formatter

      18.Filesystem

      1. Classes
      2. Non-member functions
      3. File types

      19.Multithreading

      1. Memory Model
      2. Atomic Data Types
      3. Threads
      4. Stop Token
      5. Shared Variables
      6. Thread Local Data
      7. Condition Variables
      8. Semaphores
      9. Coordination Types
      10. Tasks

      20.Coroutines

      1. Awaitables
      2. An Infinite Data Stream with co_yield

      Index

      Get the free sample chapters

      Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

      The Leanpub 60 Day 100% Happiness Guarantee

      Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

      Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

      You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

      So, there's no reason not to click the Add to Cart button, is there?

      See full terms...

      Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

      We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

      (Yes, some authors have already earned much more than that on Leanpub.)

      In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

      Learn more about writing on Leanpub

      Free Updates. DRM Free.

      If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

      Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

      Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

      Learn more about Leanpub's ebook formats and where to read them

      Write and Publish on Leanpub

      You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

      Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

      Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

      Learn more about writing on Leanpub