15 #ifndef ABSL_STRINGS_INTERNAL_OSTRINGSTREAM_H_ 16 #define ABSL_STRINGS_INTERNAL_OSTRINGSTREAM_H_ 26 namespace strings_internal {
62 class OStringStream :
private std::basic_streambuf<char>,
public std::ostream {
71 std::string*
str() {
return s_; }
72 const std::string*
str()
const {
return s_; }
73 void str(std::string* s) {
s_ = s; }
76 using Buf = std::basic_streambuf<char>;
78 Buf::int_type
overflow(
int c)
override;
79 std::streamsize
xsputn(
const char* s, std::streamsize
n)
override;
87 #endif // ABSL_STRINGS_INTERNAL_OSTRINGSTREAM_H_ std::streamsize xsputn(const char *s, std::streamsize n) override
const std::string * str() const
Buf::int_type overflow(int c) override
OStringStream(std::string *s)
std::basic_streambuf< char > Buf