diff options
author | 2015-08-26 09:47:51 -0700 | |
---|---|---|
committer | 2015-08-26 09:47:51 -0700 | |
commit | 47ec9a40ade6cf5b205b035b1142e0cc539c4f70 (patch) | |
tree | 0b4487157725c1f97f88405049d3060ff7321f27 /src/cpp/util/string_ref.cc | |
parent | afbbaf9c3e21b6a4fe41242df9d052e077dc25c0 (diff) |
Add ostream support for string_ref
Diffstat (limited to 'src/cpp/util/string_ref.cc')
-rw-r--r-- | src/cpp/util/string_ref.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index d9c9019da8..eb54f65e3a 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.cc @@ -108,4 +108,8 @@ bool operator>=(string_ref x, string_ref y) { return x.compare(y) >= 0; } +std::ostream& operator<<(std::ostream& out, const string_ref& string) { + return out << grpc::string(string.begin(), string.end()); +} + } // namespace grpc |