std::basic_..._ispanstream(3)
π NAME π
okay so this is from the std::basic_..._ispanstream(3) page in the C++ Standard Libary, and the name is literally:
std::basic_ispanstream::basic_ispanstream - std::basic_ispanstream::basic_ispanstream
Yes bestie, the constructor name is the same as the class. Iconic behavior, no notes. π
β¨ Synopsis β¨
Copying the synopsis exactly, because we do not mess with signatures:
explicit basic_ispanstream( std::span<CharT> s,
std::ios_base::openmode mode =
(1) (since C++23)
std::ios_base::in );
template< class ROS >
(2) (since C++23)
explicit basic_ispanstream( ROS&& r );
basic_ispanstream( basic_ispanstream&& rhs );
(3) (since C++23)
basic_ispanstream( const basic_ispanstream& ) = delete;
(4) (since C++23)
π¦ Description π¦
Constructs a new basic_ispanstream. Main character constructor energy fr fr.
- Uses the storage referenced by
sas initial underlying buffer of the wrappedstd::basic_spanbufdevice. The wrappedstd::basic_spanbufobject is constructed asbasic_spanbuf<Char, Traits>(s, mode | std::ios_base::in). - Uses the storage referenced by
rafter converted tostd::span<const CharT>as initial underlying buffer of the wrappedstd::basic_spanbufdevice. The wrappedstd::basic_spanbufobject is opened in modestd::ios_base::in. This overload participates in overload resolution only ifROSmodelsborrowed_range,std::convertible_to<ROS, std::span<CharT>>is false, andstd::convertible_to<ROS, std::span<const CharT>>is true. - Move constructor. Move constructs the
std::basic_istreambase subobject and the wrappedstd::basic_spanbuffrom those ofrhs, and then callsset_rdbufwith the address of the wrappedstd::basic_spanbufin*thisto install it. - Copy constructor is deleted.
basic_ispanstreamis not copyable.
Not copyable, bestie. The copy constructor said βabsolutely notβ and deleted herself from the group chat. π
π Parameters π
sβstd::spanreferencing the storage to be use as initial underlying buffer of streamrβborrowed_rangeto be use as initial underlying buffer of streammodeβ specifies stream open mode. 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_ispanstreamto be moved from
π Exceptions π
May throw implementation-defined exceptions.
So likeβ¦ stay alert, queen. Implementation-defined means the implementation gets to choose the drama. π
πΈ Example πΈ
This section is incomplete.
Reason: no example.
Not me staring at the empty example section like itβs gonna manifest one by sheer will. π«Ά
π See also π
constructorβ constructs abasic_spanbufobject (C++23) (public member function ofstd::basic_spanbuf<CharT,Traits>)
π§ Category π§
Todo no example
okay bye bestie π
this was from source/version http://cppreference.com, dated 2024.06.10, and itβs the std::basic_..._ispanstream(3) page. Slay, hydrate, and donβt delete your copy constructor unless you mean it. πβ¨
π¦ 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