...

/

Constructors With Many Arguments

Constructors With Many Arguments

The basic principle is the same as it was with default constructors. The 'in_place' command will come in handy once again.

We'll cover the following...

Another use case is a situation where your type has more arguments in a constructor. By default optional can work with a single argument (r-value ref), and efficiently pass it to the wrapped type. But what if you’d like to initialize Point(x, y)?

You ...