Compare()

System::MemoryExtensions::Details::Compare(const SharedPtr<T>&, const SharedPtr<U>&) function

Compares two smart pointers.

template<typename T,typename U> int32_t System::MemoryExtensions::Details::Compare(const SharedPtr<T> &a, const SharedPtr<U> &b)

Template parameters

ParameterDescription
TType of first smart pointer
UType of second smart pointer

Arguments

ParameterTypeDescription
aconst SharedPtr<T>&First smart pointer
bconst SharedPtr<U>&Second smart pointer

Return Value

Comparison result (0 if equal, -1 if a < b, 1 if a > b)

System::MemoryExtensions::Details::Compare(const T&, const T&) function

Compares two arithmetic values.

template<typename T> int32_t System::MemoryExtensions::Details::Compare(const T &a, const T &b)

Template parameters

ParameterDescription
TArithmetic type

Arguments

ParameterTypeDescription
aconst T&First value
bconst T&Second value

Return Value

Comparison result (0 if equal, -1 if a < b, 1 if a > b)

System::MemoryExtensions::Details::Compare(const SharedPtr<T>&, const U&) function

Compares a smart pointer with a value.

template<typename T,typename U> int32_t System::MemoryExtensions::Details::Compare(const SharedPtr<T> &a, const U &b)

Template parameters

ParameterDescription
TType pointed to by smart pointer
UType of value

Arguments

ParameterTypeDescription
aconst SharedPtr<T>&Smart pointer
bconst U&Value

Return Value

Comparison result (0 if equal, -1 if a < b, 1 if a > b)

See Also