27 Input/output library [input.output]

27.6 Stream buffers [stream.buffers]

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

27.6.3.1 basic_streambuf constructors [streambuf.cons]

basic_streambuf();

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.

Postconditions:

  • eback() == rhs.eback()

  • gptr() == rhs.gptr()

  • egptr() == rhs.egptr()

  • pbase() == rhs.pbase()

  • pptr() == rhs.pptr()

  • epptr() == rhs.epptr()

  • getloc() == rhs.getloc()

~basic_streambuf();

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.