std::weak_ptr::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> weak_ptr& operator=( const weak_ptr& r ); |
(1) | (depuis C++11) |
template< class Y > weak_ptr& operator=( const weak_ptr<Y>& r ); |
(2) | (depuis C++11) |
template< class Y > weak_ptr& operator=( const shared_ptr<Y>& r ); |
(3) | (depuis C++11) |
Remplace l'objet géré avec celui géré par
r. L'objet est partagé avec r. Si r gère aucun objet, aucun objet *this gère aussi. Equivalent à weak_ptr<T>(r).swap(*this) .Original:
Replaces the managed object with the one managed by
r. The object is shared with r. If r manages no object, *this manages no object too. Equivalent to weak_ptr<T>(r).swap(*this).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.
Paramètres
| r | - | pointeur intelligent pour partager un objet avec
Original: smart pointer to share an object with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Retourne la valeur
*this
Exceptions
Notes
La mise en œuvre peut répondre aux exigences sans créer un objet temporaire ..
weak_ptrOriginal:
The implementation may meet the requirements without creating a temporary
weak_ptr object.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.