in_place Construction
Explore how in_place construction works in C++17's std::optional to efficiently create objects and use default constructors. This lesson helps you understand advantages like improved performance when initializing wrapped objects with multiple arguments.
We'll cover the following...
We'll cover the following...
std::optional is a wrapper type, so you should be able to create optional objects almost in the same way as the wrapped object. And in most cases you can:
You ...