Skip to content

Latest commit

 

History

History
209 lines (175 loc) · 4.09 KB

File metadata and controls

209 lines (175 loc) · 4.09 KB
title _com_ptr_t Relational Operators | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-language
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
_com_ptr_t::operator>
_com_ptr_t::operator>=
_com_ptr_t.operator<=
_com_ptr_t.operator!=
_com_ptr_t::operator<=
_com_ptr_t.operator>
_com_ptr_t.operator<
_com_ptr_t.operator==
_com_ptr_t::operator==
_com_ptr_t.operator>=
_com_ptr_t::operator!=
_com_ptr_t::operator<
dev_langs
C++
helpviewer_keywords
>= operator, comparing specific objects
!= operator
operator >, pointers
operator>=, pointers
operator <, pointers
operator!=, relational operators
< operator, comparing specific objects
operator==, pointers
operator ==, pointers
<= operator, with specific objects
relational operators, _com_ptr_t class
operator >=, pointers
operator !=, relational operators
operator <=, pointers
> operator, comparing specific objects
operator<=, pointers
operator<, pointers
== operator, with specific Visual C++ objects
ms.assetid 5ae4028c-33ee-485d-bbda-88d2604d6d4b
caps.latest.revision 6
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

_com_ptr_t Relational Operators

Microsoft Specific

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

Syntax

  
      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   
);  

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