This documentation is archived and is not being maintained.

_com_ptr_t Relational Operators

Microsoft Specific

Compare the smart pointer object to another smart pointer, raw interface pointer, or NULL.

template<typename _InterfacePtr> bool operator==(
   _InterfacePtr p 
);
template<> bool operator==(
   Interface* p 
);
template<> bool operator==(
   _com_ptr_t& p 
) throw( );
template<> bool operator==(
   int NULL 
);
template<typename _InterfacePtr> bool operator!=(
   _InterfacePtr p 
);
template<> bool operator!=(
   Interface* p 
);
template<> bool operator!=(
   _com_ptr_t& p 
);
template<> bool operator!=(
   int NULL 
);
template<typename _InterfacePtr> bool operator<(
   _InterfacePtr p 
);
template<typename _InterfacePtr> bool operator>(
   _InterfacePtr p 
);
template<typename _InterfacePtr> bool operator<=(
   _InterfacePtr p 
);
template<typename _InterfacePtr> bool operator>=(
   _InterfacePtr p 
);

Remarks

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

See Also

_com_ptr_t Class

Show: