Share via


TBoundPointerProperty.operator<(_InterfacePtr) (Compact 7)

3/12/2014

The < overloaded operator determines whether the pointer that is contained in a TBoundPointerProperty<PropertyType> points to a memory address that is less than the memory address of an object that another pointer points to.

Syntax

template<typename _InterfacePtr>
bool operator<(
_InterfacePtr p)

Parameters

Return Value

Returns true if the object pointed to by the pointer in the TBoundPointerProperty<PropertyType> object is stored in a memory address that is less than the memory address pointed to by the pointer in the p parameter; otherwise, returns false.

Remarks

The _InterfacePtr type must inherit from IUnknown. To compare two pointers of the same type, the type of the pointer in the p parameter must be the type that you specified in the PropertyType template parameter of TBoundPointerProperty<PropertyType>.

For more information about using relational operators with pointers, see Comparing Pointers Using Relational Operators on MSDN.

When you use the < overloaded operator for a TBoundPointerProperty<PropertyType>, use the operator as a function and use the p parameter as the function’s argument instead of an operand in a C++ expression, as shown in the following example.

CHK_BOOL(pValue1->operator <(pValue2));

See Also

Reference

TBoundPointerProperty<PropertyType>
TBoundPointerProperty.operator<=(_InterfacePtr)
TBoundPointerProperty.operator>(_InterfacePtr)