Ocean
Loading...
Searching...
No Matches
Ocean::PairHash Struct Reference

Helper struct allowing to determine a hash value for a std::pair. More...

#include <Utilities.h>

Public Member Functions

template<typename T1 , typename T2 >
std::size_t operator() (const std::pair< T1, T2 > &pair) const
 Returns the hash value for a std::pair.
 

Detailed Description

Helper struct allowing to determine a hash value for a std::pair.

This struct can be used in combination with the std::unordered_map or std::unordered_set.

Member Function Documentation

◆ operator()()

template<typename T1 , typename T2 >
std::size_t Ocean::PairHash::operator() ( const std::pair< T1, T2 > &  pair) const
inline

Returns the hash value for a std::pair.

Parameters
pairThe pair for which the hash value will be returned
Returns
The resulting hash value
Template Parameters
T1The data type of the first pair value
T2The data type of the second pair value

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