Commit 8925b642 authored by Lucian Grijincu's avatar Lucian Grijincu Committed by Sara Golemon

folly: operator << for MutableStringPiece

Test Plan: n.a

Reviewed By: philipp@fb.com

FB internal diff: D1487919
parent f13e9e39
...@@ -37,6 +37,11 @@ std::ostream& operator<<(std::ostream& os, const StringPiece& piece) { ...@@ -37,6 +37,11 @@ std::ostream& operator<<(std::ostream& os, const StringPiece& piece) {
return os; return os;
} }
std::ostream& operator<<(std::ostream& os, const MutableStringPiece& piece) {
os.write(piece.start(), piece.size());
return os;
}
namespace detail { namespace detail {
size_t qfind_first_byte_of_memchr(const StringPiece& haystack, size_t qfind_first_byte_of_memchr(const StringPiece& haystack,
......
...@@ -804,6 +804,7 @@ typedef Range<const unsigned char*> ByteRange; ...@@ -804,6 +804,7 @@ typedef Range<const unsigned char*> ByteRange;
typedef Range<unsigned char*> MutableByteRange; typedef Range<unsigned char*> MutableByteRange;
std::ostream& operator<<(std::ostream& os, const StringPiece& piece); std::ostream& operator<<(std::ostream& os, const StringPiece& piece);
std::ostream& operator<<(std::ostream& os, const MutableStringPiece& piece);
/** /**
* Templated comparison operators * Templated comparison operators
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment