GetHashCode()

System::GetHashCode(const T&) function

Returns a hash code for the specified scalar value.

template<typename T> std::enable_if<std::is_scalar<T>::value, int>::type System::GetHashCode(const T &obj)

Template parameters

ParameterDescription
TThe type of the value for which the function generates hash code

Arguments

ParameterTypeDescription
objconst T&The value to generate hash code for

Return Value

The hash code generated for the specified value

System::GetHashCode(const T&) function

Returns a hash code for the specified object.

template<typename T> std::enable_if<!std::is_scalar<T>::value &&System::IsSmartPtr<T>::value, int>::type System::GetHashCode(const T &obj)

Template parameters

ParameterDescription
TThe type of the object for which the function generates hash code

Arguments

ParameterTypeDescription
objconst T&The SmartPtr pointing to the object to generate hash code for

Return Value

The hash code generated for the specified object

System::GetHashCode(const T&) function

Returns a hash code for the specified object which is exception.

template<typename T> std::enable_if<System::IsExceptionWrapper<T>::value, int>::type System::GetHashCode(const T &obj)

Template parameters

ParameterDescription
TThe type of the object for which the function generates hash code

Arguments

ParameterTypeDescription
objconst T&The Exception Wrapper that contains the object to generate hash code for

Return Value

The hash code generated for the specified object

System::GetHashCode(const T&) function

Returns a hash code for the specified object which is not a smart pointer nor exception.

template<typename T> std::enable_if<!std::is_scalar<T>::value &&!System::IsSmartPtr<T>::value &&!System::IsExceptionWrapper<T>::value, int>::type System::GetHashCode(const T &obj)

Template parameters

ParameterDescription
TThe type of the object for which the function generates hash code

Arguments

ParameterTypeDescription
objconst T&A const reference to the object to generate hash code for

Return Value

The hash code generated for the specified object

System::GetHashCode(const std::thread::id&) function

Specialization for std::thread::id; Returns the hash code for the specified thread object.

int System::GetHashCode(const std::thread::id &id)

See Also