Annex D (normative) Compatibility features [depr]

D.13 char* streams [depr.str.strstreams]

D.13.3 Class istrstream [depr.istrstream]

D.13.3.1 General [depr.istrstream.general]

namespace std { class istrstream : public basic_istream<char> { public: explicit istrstream(const char* s); explicit istrstream(char* s); istrstream(const char* s, streamsize n); istrstream(char* s, streamsize n); virtual ~istrstream(); strstreambuf* rdbuf() const; char* str(); private: strstreambuf sb; // exposition only }; }
The class istrstream supports the reading of objects of class strstreambuf.
It supplies a strstreambuf object to control the associated array object.
For the sake of exposition, the maintained data is presented here as:
  • sb, the strstreambuf object.

D.13.3.2 istrstream constructors [depr.istrstream.cons]

explicit istrstream(const char* s); explicit istrstream(char* s);
Effects: Initializes the base class with istream(&sb) and sb with strstreambuf(s, 0).
s shall designate the first element of an ntbs.
istrstream(const char* s, streamsize n); istrstream(char* s, streamsize n);
Effects: Initializes the base class with istream(&sb) and sb with strstreambuf(s, n).
s shall designate the first element of an array whose length is n elements, and n shall be greater than zero.

D.13.3.3 Member functions [depr.istrstream.members]

strstreambuf* rdbuf() const;
Returns: const_­cast<strstreambuf*>(&sb).
char* str();
Returns: rdbuf()->str().