[ispanstream.general] # 31 Input/output library [[input.output]](./#input.output) ## 31.9 Span-based streams [[span.streams]](span.streams#ispanstream.general) ### 31.9.4 Class template basic_ispanstream [[ispanstream]](ispanstream#general) #### 31.9.4.1 General [ispanstream.general] [🔗](#lib:basic_ispanstream) namespace std {template>class basic_ispanstream : public basic_istream {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]](ispanstream.cons "31.9.4.2 Constructors"), constructorsexplicit basic_ispanstream(std::span s, ios_base::openmode which = ios_base::in); basic_ispanstream(const basic_ispanstream&) = delete; basic_ispanstream(basic_ispanstream&& rhs); template explicit basic_ispanstream(ROS&& s); basic_ispanstream& operator=(const basic_ispanstream&) = delete; basic_ispanstream& operator=(basic_ispanstream&& rhs); // [[ispanstream.swap]](ispanstream.swap "31.9.4.3 Swap"), swapvoid swap(basic_ispanstream& rhs); // [[ispanstream.members]](ispanstream.members "31.9.4.4 Member functions"), member functions basic_spanbuf* rdbuf() const noexcept; std::span span() const noexcept; void span(std::span s) noexcept; template void span(ROS&& s) noexcept; private: basic_spanbuf *sb*; // *exposition only*};} [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10440) [*Note [1](#note-1)*: Constructing an ispanstream from a [*string-literal*](lex.string#nt:string-literal "5.13.5 String literals [lex.string]") includes the termination character '\0' in the underlying spanbuf[.](#1.sentence-1) — *end note*]