chore(storage): migrate to std::optional#16229
Open
colinmoy wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the codebase from absl::optional to std::optional across various files in the Google Cloud Storage library, benchmarks, and tests. The review identified two critical issues: a missing # symbol in the #include <optional> directive in bucket_cors_entry.h which will cause a compilation error, and an incorrect attempt to link std::optional as a CMake target in google_cloud_cpp_storage_grpc.cmake instead of simply removing the absl::optional dependency.
| #include "absl/types/optional.h" | ||
| #include <cstdint> | ||
| #include <iosfwd> | ||
| include <optional> |
Comment on lines
+233
to
+234
| gRPC::grpc++ | ||
| absl::optional | ||
| std::optional |
6c4507d to
a362644
Compare
e55baae to
f7ab610
Compare
f7ab610 to
696e68c
Compare
4d5020a to
a6cac0c
Compare
scotthart
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replacing explicit usages of absl::optional with std::optional in the Storage Client library as part of broader modernization efforts