Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
_com_ptr_t Relational Operators
Collapse the table of content
Expand the table of content

_com_ptr_t Relational Operators

Microsoft Specific

Compare the smart pointer object to another smart pointer, raw interface pointer, or 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 
);

Compares a smart pointer object to another smart pointer, raw interface pointer, or NULL. Except for the NULL pointer tests, these operators first query both pointers for IUnknown, and compare the results.

END Microsoft Specific

Community Additions

ADD
Show:
© 2015 Microsoft