31
Input/output library
[input.output]
31.9
Span-based streams
[span.streams]
31.9.4
Class template
basic_
ispanstream
[ispanstream]
31.9.4.1
General
[ispanstream.general]
🔗
namespace
std
{
template
<
class
charT,
class
traits
=
char_traits
<
charT
>
>
class
basic_ispanstream
:
public
basic_istream
<
charT, traits
>
{
public
:
using
char_type
=
charT;
using
int_type
=
typename
traits
::
int_type;
using
pos_type
=
typename
traits
::
pos_type;
using
off_type
=
typename
traits
::
off_type;
using
traits_type
=
traits;
//
[ispanstream.
cons]
, constructors
explicit
basic_ispanstream
(
std
::
span
<
charT
>
s, ios_base
::
openmode which
=
ios_base
::
in
)
; basic_ispanstream
(
const
basic_ispanstream
&
)
=
delete
; basic_ispanstream
(
basic_ispanstream
&
&
rhs
)
;
template
<
class
ROS
>
explicit
basic_ispanstream
(
ROS
&
&
s
)
; basic_ispanstream
&
operator
=
(
const
basic_ispanstream
&
)
=
delete
; basic_ispanstream
&
operator
=
(
basic_ispanstream
&
&
rhs
)
;
//
[ispanstream.
swap]
, swap
void
swap
(
basic_ispanstream
&
rhs
)
;
//
[ispanstream.
members]
, member functions
basic_spanbuf
<
charT, traits
>
*
rdbuf
(
)
const
noexcept
; std
::
span
<
const
charT
>
span
(
)
const
noexcept
;
void
span
(
std
::
span
<
charT
>
s
)
noexcept
;
template
<
class
ROS
>
void
span
(
ROS
&
&
s
)
noexcept
;
private
:
basic_spanbuf
<
charT, traits
>
sb;
//
exposition only
}
;
}
1
#
[
Note
1
:
Constructing an
ispanstream
from a
string-literal
includes the termination character
'\
0
'
in the underlying
spanbuf
.
—
end note
]