xtd 0.2.0
xtd::ihashable Class Referenceabstract
Inheritance diagram for xtd::ihashable:
xtd::interface

Definition

Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.

Namespace
xtd
Library
xtd.core
Remarks
This interface is implemented by types whose values can be hashed (for example, the numeric and string classes). A value type or class implements the get_hash_code method to create a type-specific method suitable for determining the hash code of the instance.
The xtd::ihashable interface defines the xtd::ihashable::get_hash_code method, which determines the hash code of the instance.
Examples
The following example shows how to use xtd::ihashable interface.
Examples
boxed_info.cpp.

Public Methods

virtual xtd::size get_hash_code () const noexcept=0
 Serves as a hash function for a particular type.
 

Member Function Documentation

◆ get_hash_code()

virtual xtd::size xtd::ihashable::get_hash_code ( ) const
pure virtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

The documentation for this class was generated from the following file: