std::swap(s...ospanstream)(3)
okay so bestie, welcome to the C++ Standard Libary manual π weβre on the std::swap(s...ospanstream)(3) page, and todayβs main character is std::swap(std::basic_ospanstream). yes, that βLibaryβ spelling is literally in the header π anyway, letβs get into it.
πΈ NAME πΈ
std::swap(std::basic_ospanstream) β std::swap(std::basic_ospanstream)
the way this name and description are the exact same thing is giving copy-paste energy, but periodt, thatβs the page π
β¨ Synopsis β¨
Defined in header <spanstream>
template< class CharT, class Traits >
void swap( std::basic_ospanstream<CharT, Traits>& lhs, (since
C++23)
std::basic_ospanstream<CharT, Traits>& rhs );
so this overloads the std::swap algorithm for std::basic_ospanstream π«Ά it exchanges the state of lhs with that of rhs, and effectively calls lhs.swap(rhs). no cap, thatβs the whole vibe.
π¦ Parameters π¦
lhs,rhsβ streams whose state to swap
πΈ Return value πΈ
(none) β literally nothing comes back, bestie. itβs giving βI did the swap, youβre welcome, byeβ π
π₯ Exceptions π₯
May throw implementation-defined exceptions.
so the implementation gets to decide the exact exception situation π donβt go assuming extra guarantees beyond that, fr fr.
π Example π
This section is incomplete
Reason: no example
not me reading βno exampleβ and feeling personally attacked π but okay, thatβs what the page says.
π See also π
swapβ swaps twobasic_ospanstreamobjects(C++23)(public member function)
π Category π
* Todo no example
π source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::swap(s...ospanstream)(3) β ok bye bestie, drink water, and swap responsibly! πβ¨
π¦ 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