[ospanstream.general] # 31 Input/output library [[input.output]](./#input.output) ## 31.9 Span-based streams [[span.streams]](span.streams#ospanstream.general) ### 31.9.5 Class template basic_ospanstream [[ospanstream]](ospanstream#general) #### 31.9.5.1 General [ospanstream.general] [🔗](#lib:basic_ospanstream) namespace std {template>class basic_ospanstream : public basic_ostream {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; // [[ospanstream.cons]](ospanstream.cons "31.9.5.2 Constructors"), constructorsexplicit basic_ospanstream(std::span s, ios_base::openmode which = ios_base::out); basic_ospanstream(const basic_ospanstream&) = delete; basic_ospanstream(basic_ospanstream&& rhs); basic_ospanstream& operator=(const basic_ospanstream&) = delete; basic_ospanstream& operator=(basic_ospanstream&& rhs); // [[ospanstream.swap]](ospanstream.swap "31.9.5.3 Swap"), swapvoid swap(basic_ospanstream& rhs); // [[ospanstream.members]](ospanstream.members "31.9.5.4 Member functions"), member functions basic_spanbuf* rdbuf() const noexcept; std::span span() const noexcept; void span(std::span s) noexcept; private: basic_spanbuf *sb*; // *exposition only*};}