std::swap(s...tringstream)(3)
std::swap(s...tringstream)(3) π
okay so bestie, welcome to the C++ Standard Libary manual β yes, thatβs the manual name as printed, typo and all π β and the page weβre on is std::swap(s...tringstream)(3). Weβre talking about std::swap(std::basic_ostringstream), and itβs giving tiny overload, main character energy, no cap β¨
β¨ NAME β¨
std::swap(std::basic_ostringstream) - std::swap(std::basic_ostringstream)
π¦ Synopsis π¦
Defined in header <sstream>, and look at this little template situation:
Defined in header <sstream>
template< class CharT, class Traits, class Alloc >
void swap( std::basic_ostringstream<CharT,Traits,Alloc>& lhs,
(since C++11)
std::basic_ostringstream<CharT,Traits,Alloc>& rhs );
This overloads the std::swap algorithm for std::basic_ostringstream. It exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs). Thatβs the whole flex, and honestly? iconic π«Ά
π Parameters π
lhs,rhsβ streams whose state to swap.
π Return value π
(none)
literally no return value, bestie. it just does the swap and vibes π
πΈ Exceptions πΈ
May throw implementation-defined exceptions.
so yeah, the implementation gets to decide some of the exception details here β thatβs the whole βimplementation-definedβ situation, and we respect it π
π«Ά Example π«Ά
This section is incomplete Reason: no example
not me hoping for an example and getting this instead π the manual said βno exampleβ and meant it.
π₯ See also π₯
swapβ swaps two string streams(C++11)(public member function)
π Category π
- Todo no example
cute little sign-off time: this page came from http://cppreference.com, with the version/date 2024.06.10, and the page name std::swap(s...tringstream)(3) β bye bestie, go 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