absl::operator<<

Prints the value or the status in brackets to os.

Synopsis

Declared in <absl/status/statusor.h>

template<typename T>
requires absl::HasOstreamOperator<T>::value
std::ostream&
operator<<(
    std::ostream& os,
    StatusOr<T> const& status_or);

Description

Requires T supports operator<<. Do not rely on the output format which may change without notice.

Return Value

A reference to os.

Parameters

NameDescription
osThe output stream to write to.
status_orThe object to print.