Namespaces
Variants

std::experimental::observer_ptr<W>:: swap

From cppreference.net
constexpr void swap ( observer_ptr & other ) noexcept ;
(ライブラリ基盤 TS v2)

* this が監視するオブジェクトと、別の observer_ptr オブジェクト other が監視するオブジェクトを交換します。 * this other が保持するポインタに対して swap を呼び出すことで実現されます。

パラメータ

その他 - 監視対象オブジェクトを交換する別の observer_ptr オブジェクト

戻り値

(なし)