Remove tensorflow::StatusOr::ConsumeValueOrDie.

This function was deprecated with a Clang annotation for the 2.10 TF release. We are deleting it for 2.11.

PiperOrigin-RevId: 467258243
This commit is contained in:
A. Unique TensorFlower 2022-08-12 11:40:24 -07:00 committed by TensorFlower Gardener
parent 202d79c66c
commit d57074c781
3 changed files with 9 additions and 3 deletions

View File

@ -2,8 +2,7 @@
<INSERT SMALL BLURB ABOUT RELEASE FOCUS AREA AND POTENTIAL TOOLCHAIN CHANGES>
* `tensorflow::StatusOr::ConsumeValueOrDie`, deprecated in TF 2.10 has been
removed.
# Breaking Changes
* <DOCUMENT BREAKING CHANGES HERE>
* <THIS SECTION SHOULD CONTAIN API, ABI AND BEHAVIORAL BREAKING CHANGES>

View File

@ -748,6 +748,7 @@ cc_library(
":macros",
":status",
"//tensorflow/core/lib/core:errors",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/types:span",

View File

@ -68,6 +68,7 @@ limitations under the License.
#ifndef TENSORFLOW_CORE_PLATFORM_STATUSOR_H_
#define TENSORFLOW_CORE_PLATFORM_STATUSOR_H_
#include "absl/base/attributes.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/statusor_internals.h"
@ -176,7 +177,7 @@ class StatusOr : private internal_statusor::StatusOrData<T>,
// StatusOr<T>::value()
//
// absl::StatusOr compatible versions of ValueOrDie.
// absl::StatusOr compatible versions of ValueOrDie and ConsumeValueOrDie.
const T& value() const&;
T& value() &;
const T&& value() const&&;
@ -231,6 +232,11 @@ class StatusOr : private internal_statusor::StatusOrData<T>,
const T* operator->() const;
T* operator->();
// DEPRECATED: Prefer value().
T ABSL_DEPRECATED("Use `value()` instead.") ConsumeValueOrDie() {
return std::move(ValueOrDie());
}
// Ignores any errors. This method does nothing except potentially suppress
// complaints from any tools that are checking that errors are not dropped on
// the floor.