diff --git a/docs/cpp/guides/status.md b/docs/cpp/guides/status.md index c4848a4..05f61a9 100644 --- a/docs/cpp/guides/status.md +++ b/docs/cpp/guides/status.md @@ -187,9 +187,9 @@ performed via `operator*` or `operator->`, after a call to `ok()` confirms that the `absl::StatusOr` holds an object of type `T`: ```c++ -absl::StatusOr i = GetCount(); +absl::StatusOr foo = GetCount(); if (foo.ok()) { - updated_total += *i + updated_total += *foo; } ```