From e9ad27a920260de9ab5516fb599718242dc91d8f Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 3 Jun 2020 19:20:49 -0700 Subject: [PATCH] Add member typedef `value_type` to `StatusOr` to be conformant with the standard, e.g. `std::optional`, `std::expected`. PiperOrigin-RevId: 314649934 Change-Id: Id9e9c70a486254db4221af550f0b3c77440b0fb6 --- tensorflow/stream_executor/lib/statusor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/stream_executor/lib/statusor.h b/tensorflow/stream_executor/lib/statusor.h index 7ba0954476b..738abf95893 100644 --- a/tensorflow/stream_executor/lib/statusor.h +++ b/tensorflow/stream_executor/lib/statusor.h @@ -92,7 +92,8 @@ class StatusOr : private internal_statusor::StatusOrData, typedef internal_statusor::StatusOrData Base; public: - typedef T element_type; + typedef T element_type; // DEPRECATED: use `value_type`. + typedef T value_type; // Constructs a new StatusOr with Status::UNKNOWN status. This is marked // 'explicit' to try to catch cases like 'return {};', where people think