std::experimental::ranges:: swap (ranges::tagged)
| 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 |
| Utility components | ||||
| Function objects | ||||
| Metaprogramming and type traits | ||||
| Tagged pairs and tuples | ||||
| 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 > ; |
||
交换 * this 与 rhs 的内容,如同执行 lhs. swap ( rhs ) ; 。
此函数对普通的 非限定查找 或 限定查找 不可见,仅当tagged是参数的关联类时,通过 实参依赖查找 才能找到该函数。
注释
与标准库中大多数非成员
swap
不同,此
swap
是在
tagged
主体内声明的隐藏友元函数,而非函数模板。函数声明中的
tagged
是注入类名。
参见
交换两个
tagged
对象的内容
(公开成员函数) |