std::swap(s...tch_results)(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… std::swap(s...tch_results)(3) β€” C++ Standard Libary, bestie πŸ’…

okay so we're on the std::swap(s...tch_results)(3) page and the manual name is C++ Standard Libary (yes, that's how it's spelled here, no cap). This one is all about specializing std::swap for std::match_results, and it's lowkey a tiny baddie. πŸ’–

✨ NAME ✨

std::swap(std::match_results) - std::swap(std::match_results) β€” literally that. That's the name, bestie. πŸŽ€

✨ Synopsis ✨

Defined in header <regex>
template< class BidirIt, class Alloc >

void swap( match_results<BidirIt,Alloc>& x1,             (since
C++11)

          match_results<BidirIt,Alloc>& x2 ) noexcept;

So this specializes the std::swap algorithm for std::match_results. It exchanges the contents of x1 with those of x2. Effectively calls x1.swap(x2). Periodt. πŸ’…

πŸŽ€ Parameters πŸŽ€

  • x1, x2 β€” the match_results objects whose contents will be swapped 🫢

πŸ¦‹ Type requirements πŸ¦‹

  • BidirIt must meet the requirements of LegacyBidirectionalIterator.
  • Alloc must meet the requirements of Allocator.

🌸 Return value 🌸

(none) β€” literally nothing, not even a crumb. 😭

πŸ“ Example πŸ“

This section is incomplete. Reason: no example. 😭

πŸ’œ See also πŸ’œ

  • swap β€” swaps the contents (public member function). Slay.

πŸ”₯ Category πŸ”₯

  • Todo no example

xoxo, your Unix bestie πŸ’– β€” source/version goin' out to cppreference.com, dated 2024.06.10. πŸŽ€

πŸ“¦ where this page comes from