std::swap(std::promise)
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <future>
|
||
| template< class R > void swap( promise<R> &lhs, promise<R> &rhs ); |
(C++11 起) | |
。专为std::swapstd::promise算法。交流共享状态
lhs的rhs。有效地调用lhs.swap(rhs).Original:
Specializes the std::swap algorithm for std::promise. Exchanges the shared state of
lhs with that of rhs. Effectively calls lhs.swap(rhs).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 。参数。
| lhs, rhs | - | 。承诺交换的状态。
Original: promises whose states to swap The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
===。 返回值。===
。 (无)。
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 。例外。
[编辑] 。为例。
| 本节是不完整的 原因: no example |
[编辑] 。另请参阅。
| 交换两个承诺的对象 Original: swaps two promise objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |