The C++20 Standard Library: Beyond Ranges
summary
Survey of C++20 library changes concentrates on concrete features and caveats: std::format (from fmt) adds Python‑style formatting but throws runtime errors on mismatched counts/types; chrono gets year/month/day types, strong i/o and no exceptions for invalid dates (check ok()); views like span are constexpr and accept any contiguous range; new std::jthread auto‑joins and uses stop_token for cooperative shutdown; associative contains(), erase_if overloads, atomic<shared_ptr>, atomic_ref, bit/byte utilities and sink streams for thread‑safe buffered output all land in the standard.
AI-written summary · about
chapters (19)
- 0:00Introduction and overview
- 8:25Output formatting with std::format
- 21:11Synchronized output streams
- 24:32String stream buffer access
- 26:03Span and container updates
- 31:20Associative container contains
- 32:49Uniform container erasure
- 35:40Chrono major upgrades
- 43:51Chrono error handling
- 44:12Concurrency with jthread
- 48:21Stop token and cooperative shutdown
- 50:14Atomic shared pointer
- 51:19Atomic ref for high performance
- 52:21String prefix and suffix checks
- 53:07Source location utility
- 55:17Math constants and functions
- 56:43Bit manipulation utilities
- 58:12Bit cast and endian
- 59:01Summary and closing
related talks
59mC++20: An (Almost) Complete Overview
01h 01mC++20: The Small Pearls
59mC++20 - My Favourite Code Examples
01h 25mC++23 Ranges: Conceptual Changes and Useful Practicalities
01h 02mC++20 - My Favourite Code Examples
01h 00mThe Small Pearls of C++20
01h 02mHow C++20 Changes the Way We Write Code
24mC++17 and 20 Goodies
