std::experi...ges::tagged)(3)
π std::experimental::ranges::swap(ranges::tagged) π
okay bestie, this page is from the C++ Standard Libary manual (yes, that spelling is literally in the source, no cap), and we're talking about the ranges::tagged swap situation. it's giving niche-but-iconic π
β¨ NAME β¨
std::experimental::ranges::swap(ranges::tagged) - std::experimental::ranges::swap(ranges::tagged)
β¨ Synopsis β¨
friend constexpr void swap( tagged& lhs, tagged& rhs )
noexcept(noexcept(lhs.swap(rhs)))
requires Swappable<Base>;
Swap the contents of *this and rhs, as if by lhs.swap(rhs);.
This function is not visible to ordinary unqualified or qualified lookup, and it can only be found by argument-dependent lookup when tagged is an associated class of the arguments. lowkey hidden-friend magic β¨
π Notes π
Unlike most non-member swaps in the standard library, this swap is a hidden friend function declared in the body of tagged, not a function template. the tagged in the function declaration is the injected-class-name. slay, C++ linguistics π
π¦ See also π¦
swapβ swaps the contents of twotaggedobjects (public member function)
and that's the tea π source: http://cppreference.com, date: 2024.06.10, page: std::experi...ges::tagged)(3) β go forth and vibe with your swaps, bestie πβ¨
π¦ 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