std::swap(s...c_stringbuf)(3)
π
std::swap(s...c_stringbuf)(3) β straight outta the C++ Standard Libary, bestie π«Ά
Okay so welcome to this little corner of the C++ Standard Libary β yes, that's the manual-name vibe β where we're talking about swapping std::basic_stringbuf objects. It's giving very specific, very niche, very iconic. β¨
πΈ NAME πΈ
std::swap(std::basic_stringbuf)-std::swap(std::basic_stringbuf)π
β¨ Synopsis β¨
First things first: it's Defined in header <sstream> π¦ β literally, that's the header. Here's the synopsis in all its exact-code glory:
Defined in header <sstream>
template< class CharT, class Traits, class Alloc >
(since
C++11)
void swap( std::basic_stringbuf<CharT,Traits,Alloc>& lhs, (until
C++20)
std::basic_stringbuf<CharT,Traits,Alloc>& rhs );
template< class CharT, class Traits, class Alloc >
void swap( std::basic_stringbuf<CharT,Traits,Alloc>& lhs, (since
C++20)
std::basic_stringbuf<CharT,Traits,Alloc>& rhs )
noexcept(noexcept(lhs.swap(rhs)));
So what's the tea? This overloads the std::swap algorithm for std::basic_stringbuf. It exchanges the state of lhs with that of rhs, and effectively calls lhs.swap(rhs). No cap, that's the whole move. π«
π¦ Parameters π¦
lhs,rhsβstd::basic_stringbufobjects whose states to swap π
π Return value π
(none)β literally nothing, bestie π
π Example π
This section is incomplete Reason: no example π
π See also π
swapβ swaps twobasic_stringbufobjects;(C++11)(public member function)β¨swapβ swaps the values of two objects;(function template)π«Ά
π§Ύ Category
* Todo no exampleπ
mwah π β source/version/date vibes for the sign-off: this page comes from http://cppreference.com, dated 2024.06.10, with footer title std::swap(s...c_stringbuf)(3). That's the whole page, bestie β go forth and swap those stringbufs ππ
π¦ 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