31
Input/output library
[input.output]
31.9
Span-based streams
[span.streams]
31.9.3
Class template
basic_
spanbuf
[spanbuf]
31.9.3.4
Member functions
[spanbuf.members]
🔗
std
::
span
<
charT
>
span
(
)
const
noexcept
;
1
#
Returns
: If
ios_
base
::
out
is set in
mode
, returns
std
::
span
<
charT
>
(
pbase
(
)
, pptr
(
)
)
, otherwise returns
buf
.
[
Note
1
:
In contrast to
basic_
stringbuf
, the underlying sequence never grows and is not owned
.
An owning copy can be obtained by converting the result to
basic_
string
<
charT
>
.
—
end note
]
🔗
void
span
(
std
::
span
<
charT
>
s
)
noexcept
;
2
#
Effects
:
buf
=
s
.
Initializes the input and output sequences according to
mode
.
3
#
Postconditions
:
(3.1)
If
ios_
base
::
out
is set in
mode
,
pbase
(
)
=
=
s
.
data
(
)
&
&
epptr
(
)
=
=
pbase
(
)
+
s
.
size
(
)
is
true
;
(3.1.1)
in addition, if
ios_
base
::
ate
is set in
mode
,
pptr
(
)
=
=
pbase
(
)
+
s
.
size
(
)
is
true
,
(3.1.2)
otherwise
pptr
(
)
=
=
pbase
(
)
is
true
.
(3.2)
If
ios_
base
::
in
is set in
mode
,
eback
(
)
=
=
s
.
data
(
)
&
&
gptr
(
)
=
=
eback
(
)
&
&
egptr
(
)
=
=
eback
(
)
+
s
.
size
(
)
is
true
.