_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选件类