Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Relational Function Templates

Microsoft Specific


template<typename _InterfaceType> bool operator==(
   int NULL,
   _com_ptr_t<_InterfaceType>& p 
);
template<typename _Interface,
   typename _InterfacePtr> bool operator==(
   _Interface* i,
   _com_ptr_t<_InterfacePtr>& p 
);
template<typename _Interface> bool operator!=(
   int NULL,
   _com_ptr_t<_Interface>& p 
);
template<typename _Interface,
   typename _InterfacePtr> bool operator!=(
   _Interface* i,
   _com_ptr_t<_InterfacePtr>& p 
);
template<typename _Interface> bool operator<(
   int NULL,
   _com_ptr_t<_Interface>& p 
);
template<typename _Interface,
   typename _InterfacePtr> bool operator<(
   _Interface* i,
   _com_ptr_t<_InterfacePtr>& p 
);
template<typename _Interface> bool operator>(
   int NULL,
   _com_ptr_t<_Interface>& p 
);
template<typename _Interface,
   typename _InterfacePtr> bool operator>(
   _Interface* i,
   _com_ptr_t<_InterfacePtr>& p 
);
template<typename _Interface> bool operator<=(
   int NULL,
   _com_ptr_t<_Interface>& p 
);
template<typename _Interface,
   typename _InterfacePtr> bool operator<=(
   _Interface* i,
   _com_ptr_t<_InterfacePtr>& p 
);
template<typename _Interface> bool operator>=(
   int NULL,
   _com_ptr_t<_Interface>& p 
);
template<typename _Interface,
   typename _InterfacePtr> bool operator>=(
   _Interface* i,
   _com_ptr_t<_InterfacePtr>& p 
);

Parameters

i

A raw interface pointer.

p

A smart pointer.

These function templates allow comparison with a smart pointer on the right side of the comparison operator. These are not member functions of _com_ptr_t.

END Microsoft Specific

Community Additions

ADD
Show:
© 2015 Microsoft