Any instance of
optional<T> at any given time either contains a value or does not contain a value
. When an object of type
optional<T> is contextually converted to
bool,
the conversion returns
true if the object contains a value;
otherwise the conversion returns
false.