std::packaged_task::operator=
De 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. |
<metanoindex/>
<tbody> </tbody> packaged_task& operator=(const packaged_task&) = delete; |
(1) | |
packaged_task& operator=(packaged_task&& rhs) |
(2) | |
1)
Operador de atribuição de cópia é apagado,
std::packaged_task é jogada somente.Original:
Copy assignment operator is deleted,
std::packaged_task is move-only.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.
Nota: C + 11 não especifica
const aqui, este é o defect 2067.Original:
Note: C++11 does not specify
const here, this is the defect 2067.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.
2)
Libera o estado compartilhado, se for o caso, destrói a tarefa anteriormente realizada, e move o estado compartilhado ea tarefa de propriedade da
rhs em *this. rhs fica sem um estado compartilhado e com uma tarefa movida-de.Original:
Releases the shared state, if any, destroys the previously-held task, and moves the shared state and the task owned by
rhs into *this. rhs is left without a shared state and with a moved-from task.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.
Parâmetros
| rhs | - | o
std::packaged_task para mover deOriginal: the std::packaged_task to move fromThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Exceções
2)
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |