diff options
Diffstat (limited to 'libadhocutil/buffer.cpp')
-rw-r--r-- | libadhocutil/buffer.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libadhocutil/buffer.cpp b/libadhocutil/buffer.cpp index 2ddca50..c7dda56 100644 --- a/libadhocutil/buffer.cpp +++ b/libadhocutil/buffer.cpp @@ -2,6 +2,8 @@ #include <string.h> #include <stdio.h> +namespace AdHoc { + Buffer::FragmentBase::~FragmentBase() = default; // @@ -317,15 +319,6 @@ Buffer::empty() const return content.empty(); } -std::ostream & -std::operator<<(std::ostream & os, const Buffer & b) -{ - for (const auto & f : b.content) { - os.write(f->c_str(), f->length()); - } - return os; -} - Buffer & Buffer::operator+=(const char * str) { @@ -338,3 +331,14 @@ Buffer::operator+=(const std::string & str) return append(str); } +} + +std::ostream & +std::operator<<(std::ostream & os, const AdHoc::Buffer & b) +{ + for (const auto & f : b.content) { + os.write(f->c_str(), f->length()); + } + return os; +} + |