1414
1515#include " google/cloud/grpc_error_delegate.h"
1616#include " google/cloud/internal/status_payload_keys.h"
17- #include " absl/types/optional.h"
1817#include " google/protobuf/any.pb.h"
1918#include " google/rpc/error_details.pb.h"
2019#include < google/protobuf/text_format.h>
20+ #include < optional>
2121
2222namespace google {
2323namespace cloud {
@@ -67,7 +67,7 @@ google::cloud::StatusCode MapStatusCode(grpc::StatusCode const& code) {
6767}
6868
6969// Unpacks the ErrorInfo from the Status proto, if one exists.
70- absl ::optional<google::rpc::ErrorInfo> GetErrorInfoProto (
70+ std ::optional<google::rpc::ErrorInfo> GetErrorInfoProto (
7171 google::rpc::Status const & proto) {
7272 // While in theory there _could_ be multiple ErrorInfo protos in this
7373 // repeated field, we're told that there will be at most one, and our
@@ -76,7 +76,7 @@ absl::optional<google::rpc::ErrorInfo> GetErrorInfoProto(
7676 for (google::protobuf::Any const & any : proto.details ()) {
7777 if (any.UnpackTo (&error_info)) return error_info;
7878 }
79- return absl ::nullopt ;
79+ return std ::nullopt ;
8080}
8181
8282ErrorInfo GetErrorInfo (google::rpc::Status const & status) {
@@ -88,7 +88,7 @@ ErrorInfo GetErrorInfo(google::rpc::Status const& status) {
8888}
8989
9090// Unpacks the RetryInfo from the Status proto, if one exists.
91- absl ::optional<internal::RetryInfo> GetRetryInfo (
91+ std ::optional<internal::RetryInfo> GetRetryInfo (
9292 google::rpc::Status const & proto) {
9393 // While in theory there _could_ be multiple RetryInfo protos in this
9494 // repeated field, we're told that there will be at most one, and our
@@ -101,7 +101,7 @@ absl::optional<internal::RetryInfo> GetRetryInfo(
101101 return internal::RetryInfo (d);
102102 }
103103 }
104- return absl ::nullopt ;
104+ return std ::nullopt ;
105105}
106106
107107} // namespace
0 commit comments