次の方法で共有


ComPtr::operator== 演算子

ComPtr の 2 種類のオブジェクトが等しいかどうかを示します。

bool operator==(
   const ComPtr<T>& a,
   const ComPtr<U>& b
);

bool operator==(
   const ComPtr<T>& a,
   decltype(__nullptr)
);

bool operator==(
   decltype(__nullptr),
   const ComPtr<T>& a
);

パラメーター

  • a
    ComPtr のオブジェクトへの参照。

  • b
    ComPtr の別のオブジェクトへの参照。

戻り値

最初の演算子は bに対応するオブジェクト a が等しい場合 true を生成します; それ以外 false。

2 番目と 3 番目の演算子は、オブジェクト a が nullptrと等しい true を生成します; それ以外 false。

必要条件

ヘッダー: client.h

Microsoft名前空間: :: WRL

参照

関連項目

Microsoft::WRL 名前空間

ComPtr クラス