Assigns a value convertible to Status, making *this non‐ok.

Synopsis

Declared in <absl/status/statusor.h>

template<typename U = absl::Status>
requires internal_statusor::IsConstructionFromStatusValid<
                                  false, T, U>::value
StatusOr&
operator=(U&& v);

Return Value

A reference to *this.

Parameters

Name

Description

v

The status (or value convertible to a status) to store.

Created with MrDocs