--- title: "Relational Function Templates | Microsoft Docs" ms.custom: "" ms.date: "11/04/2016" ms.reviewer: "" ms.suite: "" ms.technology: - "cpp-language" ms.tgt_pltfrm: "" ms.topic: "language-reference" dev_langs: - "C++" helpviewer_keywords: - "relational function templates" ms.assetid: 57893a51-9adb-41fc-941d-2ca97687db2a 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" --- # Relational Function Templates **Microsoft Specific** ## Syntax ``` template bool operator==( int NULL, _com_ptr_t<_InterfaceType>& p ); template bool operator==( _Interface* i, _com_ptr_t<_InterfacePtr>& p ); template bool operator!=( int NULL, _com_ptr_t<_Interface>& p ); template bool operator!=( _Interface* i, _com_ptr_t<_InterfacePtr>& p ); template bool operator<( int NULL, _com_ptr_t<_Interface>& p ); template bool operator<( _Interface* i, _com_ptr_t<_InterfacePtr>& p ); template bool operator>( int NULL, _com_ptr_t<_Interface>& p ); template bool operator>( _Interface* i, _com_ptr_t<_InterfacePtr>& p ); template bool operator<=( int NULL, _com_ptr_t<_Interface>& p ); template bool operator<=( _Interface* i, _com_ptr_t<_InterfacePtr>& p ); template bool operator>=( int NULL, _com_ptr_t<_Interface>& p ); template bool operator>=( _Interface* i, _com_ptr_t<_InterfacePtr>& p ); ``` #### Parameters *i* A raw interface pointer. `p` A smart pointer. ## Remarks 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** ## See Also [_com_ptr_t Class](../cpp/com-ptr-t-class.md)