_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 专用
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈