Default Construction
Using std::optional with class constructors can be slightly inefficient sometimes. In this lesson, we'll learn a way to fix that.
We'll cover the following...
We'll cover the following...
Movable Types
If you have a class with a default constructor, like:
How would you create an optional that contains UserName{}?
You can write:
That works but it creates an additional temporary object. If we traced each different constructor and ...