共用方式為


_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,並比較結果。

結束 Microsoft 特定

請參閱

參考

_com_ptr_t 類別