1)Astd::spanreferencing the underlying buffer or written area, depending on the open mode of the wrappedstd::basic_spanbuf. 2)(none) Example Run this code #include <cassert>#include <iostream>#include <span>#include <spanstream>intmain(){charout_buf[16];std::ospanstreamost{std::span<...
The class template std::basic_spanstream implements input and output operations on streams based on fixed buffers. At the low level, the class essentially wraps a raw device implementation of std::basic_spanbuf into a higher-level interface of std::basic_iostream. The complete interface to ...
void swap( basic_spanstream& other ); (C++23 起) 和other 交换流状态。 这是通过调用 std::basic_iostream<CharT, Traits>::swap(other) 并交换包装的 std::basic_spanbuf 对象(可通过 *rdbuf() 访问)进行的。 参数other - 要与之交换状态的流 返回值...
basic_spanstream::swap (C++23) basic_spanstream::rdbuf (C++23) Underlying buffer operations basic_spanstream::span (C++23) Non-member functions swap(std::basic_spanstream) (C++23) std::basic_spanbuf<CharT, Traits>* rdbuf() const noexcept; (since C++23) Returns pointer to the wrapped ...
swap(std::basic_spanstream) (C++23) Defined in header <spanstream> template< class CharT, class Traits > void swap( std::basic_spanstream<CharT, Traits>& lhs, std::basic_spanstream<CharT, Traits>& rhs ); (since C++23) Overloads the std::swap algorithm for std::basic_spanstream...
explicitbasic_spanstream(std::span<CharT>s,std::ios_base::openmodemode= std::ios_base::in|std::ios_base::out); (1)(since C++23) basic_spanstream(basic_spanstream&&rhs); (2)(since C++23) basic_spanstream(constbasic_spanstream&)=delete; ...