std::weak_ptr::operator=
Aus 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) | (seit C++11) |
template< class Y > weak_ptr& operator=( const weak_ptr<Y>& r ); |
(2) | (seit C++11) |
template< class Y > weak_ptr& operator=( const shared_ptr<Y>& r ); |
(3) | (seit C++11) |
Ersetzt das verwaltete Objekt mit dem von
r verwaltet. Die Aufgabe wird mit r geteilt. Wenn r kein Objekt verwaltet, verwaltet *this kein Objekt zu. Entspricht 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.
Parameter
| r | - | Smart-Pointer auf ein Objekt mit Aktien
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. |
Rückgabewert
*this
Ausnahmen
Notes
Die Implementierung kann die Anforderungen ohne eine temporäre
weak_ptr Objekt treffen .Original:
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.