From Jason Turner
Watch on YouTube

Summary

This episode explores the in_place_t constructor parameter used with std::optional, std::variant, and std::any for efficient in-place object construction. Jason demonstrates how using in_place_t allows you to construct objects directly in their final location without intermediate moves or copies. The video covers std::in_place_t, std::in_place_type_t, and std::in_place_index_t variants and when each is appropriate to use.

Resources

Tags