std::experimental::ranges::swap (ranges::tagged)

From cppreference.com
 
 
Experimental
Technical Specification
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges (ranges TS)
Reflection (reflection TS)
Mathematical special functions (special functions TR)
Experimental Non-TS
Pattern Matching
Linear Algebra
std::execution
Contracts
2D Graphics
 
 
General utilities library
Utility components
Function objects
Metaprogramming and type traits
Tagged pairs and tuples
                          
tag specifiers
                                      
                          
 
std::experimental::ranges::tagged
Member functions
Non-member functions
ranges::swap(ranges::tagged)
Helper classes
 
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 can only be found by argument-dependent lookup when tagged is an associated class of the arguments.

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.

See also

swaps the contents of two tagged objects
(public member function)