about summary refs log tree commit diff
path: root/absl/strings/internal/ostringstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/internal/ostringstream.h')
-rw-r--r--absl/strings/internal/ostringstream.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/absl/strings/internal/ostringstream.h b/absl/strings/internal/ostringstream.h
index 013146599d3d..6e1325b9140f 100644
--- a/absl/strings/internal/ostringstream.h
+++ b/absl/strings/internal/ostringstream.h
@@ -75,18 +75,8 @@ class OStringStream : private std::basic_streambuf<char>, public std::ostream {
  private:
   using Buf = std::basic_streambuf<char>;
 
-  Buf::int_type overflow(int c) override {
-    assert(s_);
-    if (!Buf::traits_type::eq_int_type(c, Buf::traits_type::eof()))
-      s_->push_back(static_cast<char>(c));
-    return 1;
-  }
-
-  std::streamsize xsputn(const char* s, std::streamsize n) override {
-    assert(s_);
-    s_->append(s, n);
-    return n;
-  }
+  Buf::int_type overflow(int c) override;
+  std::streamsize xsputn(const char* s, std::streamsize n) override;
 
   std::string* s_;
 };