diff options
author | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2017-11-14 16:19:39 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2017-11-14 16:19:39 +0000 |
commit | f2821062b6d9ff52aa138dc8565f6672671eb8a2 (patch) | |
tree | 215a86203d9fd03c8e3b2ba8c2cdee4e518f6617 /document | |
parent | b58dee9562801107fafac6bb3fb2d3b8a998d07a (diff) |
Add std::ostream operator<< overload to Bucket
Lets test assertion macros print bucket value transparently.
Diffstat (limited to 'document')
-rw-r--r-- | document/src/vespa/document/bucket/bucket.cpp | 5 | ||||
-rw-r--r-- | document/src/vespa/document/bucket/bucket.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/document/src/vespa/document/bucket/bucket.cpp b/document/src/vespa/document/bucket/bucket.cpp index d2855c0b3a1..b79d45eee34 100644 --- a/document/src/vespa/document/bucket/bucket.cpp +++ b/document/src/vespa/document/bucket/bucket.cpp @@ -23,4 +23,9 @@ vespalib::asciistream& operator<<(vespalib::asciistream& os, const Bucket& id) return os << "Bucket(" << id.getBucketSpace() << ", " << id.getBucketId() << ")"; } +std::ostream& operator<<(std::ostream& os, const Bucket& id) +{ + return os << id.toString(); +} + } diff --git a/document/src/vespa/document/bucket/bucket.h b/document/src/vespa/document/bucket/bucket.h index 5aa9b360c42..44068e1c443 100644 --- a/document/src/vespa/document/bucket/bucket.h +++ b/document/src/vespa/document/bucket/bucket.h @@ -45,5 +45,6 @@ private: }; vespalib::asciistream& operator<<(vespalib::asciistream&, const Bucket&); +std::ostream& operator<<(std::ostream&, const Bucket&); } |