27 Input/output library [input.output]

27.6 Stream buffers [stream.buffers]

27.6.3 Class template basic_streambuf<charT,traits> [streambuf] basic_streambuf constructors [streambuf.cons]


Effects: Constructs an object of class basic_streambuf<charT,traits> and initializes:306

  • all its pointer member objects to null pointers,

  • the getloc() member to a copy the global locale, locale(), at the time of construction.

Remarks: Once the getloc() member is initialized, results of calling locale member functions, and of members of facets so obtained, can safely be cached until the next time the member imbue is called.

basic_streambuf(const basic_streambuf& rhs);

Effects: Constructs a copy of rhs.


  • eback() == rhs.eback()

  • gptr() == rhs.gptr()

  • egptr() == rhs.egptr()

  • pbase() == rhs.pbase()

  • pptr() == rhs.pptr()

  • epptr() == rhs.epptr()

  • getloc() == rhs.getloc()


Effects: None.

The default constructor is protected for class basic_streambuf to assure that only objects for classes derived from this class may be constructed.