「cpp/thread/unique lock/swap2」の版間の差分
提供: cppreference.com
< cpp | thread | unique lock
細 (Use {{lc}}. Update links. Various fixes.) |
|||
(1人の利用者による、間の1版が非表示) | |||
1行: | 1行: | ||
− | |||
{{cpp/title | swap<small>(std::unique_lock)</small>}} | {{cpp/title | swap<small>(std::unique_lock)</small>}} | ||
{{cpp/thread/unique_lock/navbar}} | {{cpp/thread/unique_lock/navbar}} | ||
{{dcl begin}} | {{dcl begin}} | ||
− | {{dcl | | + | {{dcl | |
template< class Mutex > | template< class Mutex > | ||
− | void swap( unique_lock<Mutex> &lhs, | + | void swap( unique_lock<Mutex>& lhs, |
− | unique_lock<Mutex> &rhs ); | + | unique_lock<Mutex>& rhs ) ; |
}} | }} | ||
{{dcl end}} | {{dcl end}} | ||
− | + | {{lc|std::swap}} {{lc|std::unique_lock}} {{tt|lhs}} {{tt|rhs}} {{c|lhs.swap(rhs)}} | |
− | === | + | ====== |
{{par begin}} | {{par begin}} | ||
− | {{par | lhs, rhs | | + | {{par | lhs, rhs | }} |
{{par end}} | {{par end}} | ||
− | === | + | ====== |
− | + | () | |
− | + | ||
− | + | ||
− | + | ||
===例=== | ===例=== | ||
29行: | 25行: | ||
}} | }} | ||
− | === | + | ====== |
{{dsc begin}} | {{dsc begin}} | ||
{{dsc inc | cpp/thread/unique_lock/dsc swap}} | {{dsc inc | cpp/thread/unique_lock/dsc swap}} |