I/O manipulators | ||||
Print functions(C++23) | ||||
C-style I/O | ||||
Buffers | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++20) | ||||
Streams | ||||
Abstractions | ||||
File I/O | ||||
String I/O | ||||
Array I/O | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
Synchronized Output | ||||
(C++20) | ||||
Types | ||||
Error category interface | ||||
(C++11) | ||||
(C++11) |
Public member functions | ||||
basic_spanbuf::basic_spanbuf (C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
Protected member functions | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
Non-member functions | ||||
(C++23) |
basic_spanbuf(): basic_spanbuf(std::ios_base::in|std::ios_base::out){} | (1) | (since C++23) |
explicit basic_spanbuf(std::ios_base::openmode which) : basic_spanbuf(std::span<CharT>{}, which){} | (2) | (since C++23) |
explicit basic_spanbuf(std::span<CharT> buf,std::ios_base::openmode which= std::ios_base::in|std::ios_base::out); | (3) | (since C++23) |
basic_spanbuf(const basic_spanbuf&)= delete; | (4) | (since C++23) |
basic_spanbuf( basic_spanbuf&& rhs); | (5) | (since C++23) |
basic_spanbuf
that has no underlying buffer and is opened for both input and output. The pointers to get and put area are set to the null pointer value.basic_spanbuf
is opened in mode specified bywhich.basic_spanbuf
that manages the underlying buffer referenced bybuf (or has no underlying buffer ifbuf is empty) and is opened in mode specified bywhich. The pointers to get and put area are set as following, or to the null pointer value if not mentioned in the table:Set bits in open mode (affecting pointers to get area) | Return value after setting | ||
---|---|---|---|
eback() | gptr() | egptr() | |
std::ios_base::in | s.data() | s.data() | s.data()+ s.size() |
Set bits in open mode (affecting pointers to put area) | Return value after setting | ||
pbase() | pptr() | epptr() | |
std::ios_base::out&&!std::ios_base::ate | s.data() | s.data() | s.data()+ s.size() |
std::ios_base::out&&std::ios_base::ate | s.data() | s.data()+ s.size() | s.data()+ s.size() |
basic_spanbuf
is not copyable.Contents |
buf | - | astd::span referencing the underlying buffer | ||||||||||||||||
rhs | - | anotherbasic_spanbuf | ||||||||||||||||
which | - | specifies stream open mode. It is bitmask type, the following constants are defined:
|
These constructors are typically called by the constructors ofstd::basic_ispanstream,std::basic_ospanstream, andstd::basic_spanstream.
This section is incomplete Reason: no example |
constructs thebasic_ispanstream (public member function of std::basic_ispanstream<CharT,Traits> )[edit] | |
constructs thebasic_ospanstream (public member function of std::basic_ospanstream<CharT,Traits> )[edit] | |
constructs thebasic_spanstream (public member function of std::basic_spanstream<CharT,Traits> )[edit] |