C++17 in Detail
C++17 in Detail
Summary:
Introduction
The book "C++17 in Detail" by Bartłomiej Filipek was published in 2019 and instantly became one of the most authoritative sources on the new C++17 standard. This is not another beginner's tutorial — it is a deep technical guide that will help intermediate and advanced developers master all the key features of the C++17 standard and learn to apply them in practice. The book contains 338 pages of concentrated information, supported by code examples and practical advice.
What is this book about?
"C++17 in Detail" is dedicated to a detailed breakdown of the innovations brought by the C++17 standard. The author systematically examines each feature, starting with the language and ending with the standard library. In the book you will find:
- Structured bindings — how to unpack tuples, pairs, and structures into individual variables.
- if constexpr — compile-time conditional branching, allowing you to write more efficient and cleaner template code.
- std::optional, std::variant, std::any — new wrapper types for safe work with optional values, alternatives, and dynamic types.
- string_view — a non-owning string view that speeds up work with substrings without copying.
- Parallel algorithms — the standard library now supports parallel execution of algorithms (std::execution::par).
- File system (std::filesystem) — cross-platform work with files and directories.
- Improvements in constexpr — you can now write constexpr functions with loops, branching, and even dynamic memory allocation (limited).
- New attributes — [[fallthrough]], [[maybe_unused]], [[nodiscard]], and others.
- Template simplifications — deduction guides, auto in template parameters, fold expressions.
Each chapter is structured on the principle of "from theory to practice": first, the syntax and semantics are explained, then real-world usage examples are provided, and at the end — common pitfalls and recommendations.
Who is this book for?
The book is intended for programmers who already have experience with C++ (at least at the C++11/14 level) and want to quickly and thoroughly master C++17. It will be useful for:
- Developers transitioning from older standards to C++17.
- Engineers writing high-load or embedded systems who want to use new features for optimization.
- Teachers and advanced students studying modern C++.
- Anyone who wants to write safer, more expressive, and more efficient code.
The book is not suitable for beginner programmers — a solid knowledge of C++ basics (pointers, templates, STL) is required to understand the material.
What will the reader learn?
After reading the book, you will be able to:
- Confidently use all the major new features of C++17 in daily work.
- Write cleaner and more concise code using structured bindings and if constexpr.
- Apply std::optional and std::variant for safe error handling and alternative states.
- Work with the file system without external libraries.
- Speed up algorithms using parallel versions from the STL.
- Understand the internal mechanisms of new types and know how to avoid pitfalls.
- Prepare for the transition to C++20, as many C++17 features are the foundation for future standards.
Strengths of the book
1. Depth and structure. The author does not simply list features, but explains why they were added, what problems they solve, and how to use them correctly. Each chapter contains a "Common pitfalls" section, which is very valuable for a practicing developer.
2. Practical focus.