Annex D (normative)
Compatibility features
[depr]
D.8
char*
streams
[depr.str.strstreams]
D.8.4
Class
ostrstream
[depr.ostrstream]
D.8.4.1
ostrstream
constructors
[depr.ostrstream.cons]
🔗
ostrstream();
1
#
Effects:
Constructs an object of class
ostrstream
, initializing the base class with
ostream(&sb)
and initializing
sb
with
strstreambuf()
.
🔗
ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
2
#
Effects:
Constructs an object of class
ostrstream
, initializing the base class with
ostream(&sb)
, and initializing
sb
with one of two constructors:
(2.1)
If
(mode & app) == 0
, then
s
shall designate the first element of an array of
n
elements
.
The constructor is
strstreambuf(s, n, s)
.
(2.2)
If
(mode & app) != 0
, then
s
shall designate the first element of an array of
n
elements that contains an
ntbs
whose first element is designated by
s
.
The constructor is
strstreambuf(s, n, s + std::strlen(s))
.
335
335)
The function signature
strlen(const char*)
is declared in
<cstring>
.