共用方式為


_com_ptr_t 關係運算子

Microsoft 特定的

將智慧型指標物件與另一個智慧型指標、一般介面指標或 NULL 進行比較。

template<typename _OtherIID> 
bool operator==( 
   const _com_ptr_t<_OtherIID>& p 
); 

template<typename _OtherIID>  
bool operator==( 
   _com_ptr_t<_OtherIID>& p 
); 

template<typename _InterfaceType> 
bool operator==( 
   _InterfaceType* p 
); 

template<> 
bool operator==( 
   Interface* p 
); 

template<> 
bool operator==( 
   const _com_ptr_t& p 
) throw(); 

template<> 
bool operator==( 
   _com_ptr_t& p 
) throw(); 

bool operator==( 
   int null 
);

template<typename _OtherIID> 
bool operator!=( 
   const _com_ptr_t<_OtherIID>& p 
); 

template<typename _OtherIID> 
bool operator!=( 
   _com_ptr_t<_OtherIID>& p 
); 

template<typename _InterfaceType> 
bool operator!=( 
   _InterfaceType* p 
); 

bool operator!=( 
   int null 
);

template<typename _OtherIID> 
bool operator<( 
   const _com_ptr_t<_OtherIID>& p 
); 

template<typename _OtherIID> 
bool operator<( 
   _com_ptr_t<_OtherIID>& p 
); 

template<typename _InterfaceType> 
bool operator<( 
   _InterfaceType* p 
);

template<typename _OtherIID> 
bool operator>( 
   const _com_ptr_t<_OtherIID>& p 
); 

template<typename _OtherIID> 
bool operator>(_com_ptr_t< 
   _OtherIID>& p 
); 

template<typename _InterfaceType> 
bool operator>( 
   _InterfaceType* p 
);

template<typename _OtherIID> 
bool operator<=( 
   const _com_ptr_t<_OtherIID>& p 
); 

template<typename _OtherIID> 
bool operator<=( 
   _com_ptr_t<_OtherIID>& p 
); 

template<typename _InterfaceType> 
bool operator<=( 
   _InterfaceType* p 
);

template<typename _OtherIID> 
bool operator>=( 
   const _com_ptr_t<_OtherIID>& p 
); 

template<typename _OtherIID> 
bool operator>=( 
   _com_ptr_t<_OtherIID>& p 
); 

template<typename _InterfaceType> 
bool operator>=( 
   _InterfaceType* p 
);

備註

將智慧型指標物件與另一個智慧型指標、一般介面指標或 NULL 進行比較。 除了 NULL 指標測試之外,這些運算子會先查詢 IUnknown 的兩個指標,並比較結果。

END Microsoft 特定的

請參閱

參考

_com_ptr_t 類別