30 Input/output library [input.output]

30.6 Stream buffers [stream.buffers]

30.6.3 Class template basic_­streambuf [streambuf]

30.6.3.1 basic_­streambuf constructors [streambuf.cons]

basic_streambuf();

Effects: Constructs an object of class basic_­streambuf<charT, traits> and initializes:299

  • 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.