Object Creation
The different methods of in-place object creation are discussed briefly in this lesson.
We'll cover the following...
We'll cover the following...
There are several ways you can create std::any object:
- a default initialisation - then the object is empty
- a direct initialisation with a value/object
- in place
std::in_place_type - via
std::make_any
You can see it in the following example: