std::basic_..._ospanstream(3)
π NAME π
okay so this is the manual page for std::basic_ospanstream::basic_ospanstream, aka the std::basic_..._ospanstream(3) page from the C++ Standard Library. Itβs all about constructing a new basic_ospanstream, and yes bestie itβs giving C++23 icon energy β¨.
β¨ Synopsis β¨
explicit basic_ospanstream( std::span<CharT> s,
std::ios_base::openmode mode =
(1) (since C++23)
std::ios_base::out );
basic_ospanstream( basic_ospanstream&& rhs );
(2) (since C++23)
basic_ospanstream( const basic_ospanstream& ) = delete;
(3) (since C++23)
Constructs a new basic_ospanstream. Periodt π
.
- (1) (since C++23) β Uses the storage referenced by
sas the initial underlying buffer of the wrappedstd::basic_spanbufdevice. The wrappedstd::basic_spanbufobject is constructed asbasic_spanbuf<Char, Traits>(s, mode | std::ios_base::out). - (2) (since C++23) β Move constructor. Move constructs the
std::basic_ostreambase subobject and the wrappedstd::basic_spanbuffrom those ofrhs, and then callsset_rdbufwith the address of the wrappedstd::basic_spanbufin*thisto install it. - (3) (since C++23) β Copy constructor is deleted.
basic_ospanstreamis not copyable.
π Parameters π
sβ astd::spanreferencing the storage to be used as the initial underlying buffer of the stream.modeβ specifies stream open mode. The following constants and bit-wise OR between them may be used:appβ seek to the end of stream before each writebinaryβ open in binary modeinβ open for readingoutβ open for writingtruncβ discard the contents of the stream when openingateβ seek to the end of stream immediately after opennoreplace(C++23) β open in exclusive mode
otherβ anotherbasic_ospanstreamto be moved from
π Exceptions π
May throw implementation-defined exceptions. No cap, thatβs literally what it says π.
π¦ Example π¦
This section is incomplete Reason: no example
πΈ See also πΈ
- constructor β constructs a
basic_spanbufobject (C++23) (public member function ofstd::basic_spanbuf<CharT,Traits>)
π Category π
- Todo no example
later, bestie π«Ά β this came from http://cppreference.com, version/date 2024.06.10, and the manual tag is std::basic_..._ospanstream(3).
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms