- Author(s): ctiller
- Approver: roth
- Status: {In Review}
- Implemented in: grpc/grpc#27903
- Last updated: November 1, 2021
- Discussion at:
Add conversion operations between absl::Status and grpc::Status to help boost interoperability with that library, and to aid in modernizing our codebase.
grpc::Status was originally intended to be a polyfill for absl::Status. The released absl::Status however was not directly compatible with grpc::Status. Introduce canonical conversion operations between the two types.
N/A
Add to grpc::Status:
- an explicit conversion from absl::Status
- implicit const& and && conversion operators to absl::Status
i.e.:
namespace grpc {
class Status {
public:
// ...
explicit Status(absl::Status&&);
operator const absl::Status&() const;
};
}
We'd like to change to absl::Status everywhere, but we can't. Internal users are experiencing pain since these conversions are available there, but not externally.
This proposal will be implemented as a single PR (and likely an associated cherry-pick internally).
N/A