This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: taught Date how to stream itself #1385
Merged
Merged
Conversation
This file contains 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
Date was the only non-aggregate "Value" type that didn't already know how to print itself. Everything else, (bool, int64_t, double, std::string, Bytes, and Timestamp) were all streamable directly. `internal/date.h` already had this support, so it just took a little plumbing to make the user-facing `Date` class to itself also be streamable.
coryan
approved these changes
Mar 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @devbww and @devjgm)
google/cloud/spanner/date.h, line 44 at r1 (raw file):
/// @name Output streaming friend std::ostream& operator<<(std::ostream& os, Date const& date);
Missing #include <ostream>
?
devbww
reviewed
Mar 15, 2020
Codecov Report
@@ Coverage Diff @@
## master #1385 +/- ##
==========================================
+ Coverage 94.58% 94.59% +<.01%
==========================================
Files 185 185
Lines 15316 15325 +9
==========================================
+ Hits 14487 14497 +10
+ Misses 829 828 -1
Continue to review full report at Codecov.
|
devbww
approved these changes
Mar 15, 2020
devjgm
added a commit
to devjgm/google-cloud-cpp
that referenced
this pull request
May 7, 2020
…panner#1385) * feat: taught Date how to stream itself Date was the only non-aggregate "Value" type that didn't already know how to print itself. Everything else, (bool, int64_t, double, std::string, Bytes, and Timestamp) were all streamable directly. `internal/date.h` already had this support, so it just took a little plumbing to make the user-facing `Date` class to itself also be streamable. * added missing include * removed friendship from op<<
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Date was the only non-aggregate "Value" type that didn't already know
how to print itself. Everything else, (bool, int64_t, double,
std::string, Bytes, and Timestamp) were all streamable directly.
internal/date.h
already had this support, so it just took a littleplumbing to make the user-facing
Date
class to itself also bestreamable.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)