cpp/utility/expected

The class template provides a way to store either of two values. An object of at any given time either holds an expected value of type, or an unexpected value of type. is never valueless.

The stored value is allocated directly within the storage occupied by the object. No dynamic memory allocation takes place.

A program is ill-formed if it instantiates an with a reference type, a function type, or a specialization of. In addition, must not be std or.