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
This commit is contained in:
A. Unique TensorFlower 2020-06-03 19:20:49 -07:00 committed by TensorFlower Gardener
parent 885fce6bb1
commit e9ad27a920

View File

@ -92,7 +92,8 @@ class StatusOr : private internal_statusor::StatusOrData<T>,
typedef internal_statusor::StatusOrData<T> 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