libMesh
Loading...
Searching...
No Matches
Public Member Functions | List of all members
libMesh::hash Struct Reference

#include <hashing.h>

Public Member Functions

template<typename T1 , typename T2 >
std::size_t operator() (const std::pair< T1, T2 > &x) const
 
template<typename T , std::size_t N>
std::size_t operator() (const std::array< T, N > &x) const
 

Detailed Description

Definition at line 44 of file hashing.h.

Member Function Documentation

◆ operator()() [1/2]

template<typename T , std::size_t N>
std::size_t libMesh::hash::operator() ( const std::array< T, N > &  x) const
inline

Definition at line 59 of file hashing.h.

60 {
61 // Hopefully argument-based lookup lets us recurse with this
62 using std::hash;
63
64 std::size_t returnval = 0;
65 for (std::size_t i = 0; i != N; ++i)
66 boostcopy::hash_combine(returnval, x[i]);
67
68 return returnval;
69 }
void hash_combine(std::size_t &seed, const T &value)
Definition hashing.h:34

References libMesh::boostcopy::hash_combine().

◆ operator()() [2/2]

template<typename T1 , typename T2 >
std::size_t libMesh::hash::operator() ( const std::pair< T1, T2 > &  x) const
inline

Definition at line 47 of file hashing.h.

48 {
49 // Hopefully argument-based lookup lets us recurse with this
50 using std::hash;
51
52 std::size_t returnval = hash<T1>()(x.first);
53 boostcopy::hash_combine(returnval, x.second);
54
55 return returnval;
56 }

References libMesh::boostcopy::hash_combine().


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