Combining C++17 Features
summary
Concrete examples show how if constexpr and the new if with initialization let templates pick different instantiations without SFINAE hacks, how class template argument deduction and a new scope_lock simplify locks, and how fold expressions plus auto non‑type template parameters replace recursive variadic tricks. Measurements report substring creation doubling sort time, switching to string_view cuts that overhead, and combining string_view with parallel algorithms improves throughput; a lifetime‑profile extension flags the remaining view/span hazards at compile time.
AI-written summary · about
chapters (19)
- 0:00Start
- 5:42insert a string and int into vector by converting it to string
- 11:57create the lock with a lock guard
- 13:35extend this to multiple mutexes
- 14:22use a deadlock avoidance mechanism
- 18:49best matching constructor
- 22:13initialize the vector with the beginning and end of this set
- 28:33print all the arguments
- 29:41print out all the arguments
- 34:27print out all the arguments with the space in front
- 35:56pass a string as an argument to this generic file
- 36:45initialize the vector of strings
- 38:09create a substring
- 41:21creating a string view to an existing string
- 43:47create a temporary string
- 48:29switch to parallel computing
- 52:36implement polymorphism
- 53:27using pointers as elements of a vector
- 53:57create a vector of either circle or line








