System::Threading::Interlocked::Exchange method

Interlocked::Exchange(T&, T) method

変数の値を交換します:新しい値を格納し、格納直前の変数の値を返します。

template<typename T> static std::enable_if<IsSupportedInt<T>, T>::type System::Threading::Interlocked::Exchange(T &location1, T value)
パラメーター説明
T変数の型。
パラメーター説明
location1T&変更する変数参照。
valueT格納する値。

ReturnValue

変更直前の変数の値。

参照

Interlocked::Exchange(T&, T) method

変数の値を交換します:新しい値を格納し、格納直前の変数の値を返します。未実装です。

template<typename T> static std::enable_if<!IsSupportedInt<T>, T>::type System::Threading::Interlocked::Exchange(T &location1, T value)
パラメーター説明
T変数の型。
パラメーター説明
location1T&変更する変数参照。
valueT格納する値。

ReturnValue

変更直前の変数の値。

参照