Constructs a new StatusOr with an unknown status.

Synopsis

Declared in <absl/status/statusor.h>

explicit
StatusOr();

Description

Constructs a new absl::StatusOr with an absl::StatusCode::kUnknown status. This constructor is marked 'explicit' to prevent usages in return values such as 'return {};', under the misconception that absl::StatusOr<std::vector<int>> will be initialized with an empty vector, instead of an absl::StatusCode::kUnknown error code.

Created with MrDocs