cpp/utility/optional/and then

If contains a value, invokes  with the contained value as an argument, and returns the result of that invocation; otherwise, returns an empty.

The return type (see below) must be a specialization of std (unlike ). Otherwise, the program is ill-formed.

@1@ Equivalent to

@2@ Equivalent to

@3@ Equivalent to

@4@ Equivalent to

Return value
The result of or an empty std, as described above.