Summary
In this chapter you have learned how to use std::optional
to represent optional values in your code. You have also seen how to combine std::pair
, std::tuple
, std::any
, and std::variant
together with standard containers and metaprogramming to store and iterate over elements of different types. You also learned that std::tie()
is a conceptually simple yet powerful tool that can be used for projection and reflection.
In the next chapter, you will find out how to further expand your C++ toolbox to create libraries by learning how to construct hidden proxy objects.