The recipes included in this chapter are as follows:
- Expressing time intervals with chrono::duration
- Measuring function execution time with a standard clock
- Generating hash values for custom types
- Using std::any to store any value
- Using std::optional to store optional values
- Using std::variant as a type-safe union
- Visiting a std::variant
- Registering a function to be called when a program exits normally
- Using type traits to query properties of types
- Writing your own type traits
- Using std::conditional to choose between types