| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | List of all members
GaudiUtils::GenericHash< T > Struct Template Reference

Generic hash implementation (for easy migration to the new Hash class). More...

`#include <GaudiKernel/Hash.h>`

## Public Member Functions
std::size_t | operator() (const T &key) const
| the generic hash function More...

## Detailed Description

### template<class T>
struct GaudiUtils::GenericHash< T >

Generic hash implementation (for easy migration to the new Hash class).

Definition at line 28 of file Hash.h.

## Member Function Documentation

## ◆ operator()()

template<class T >

std::size_t GaudiUtils::GenericHash< T >::operator() | ( | const T & | key | ) | const
| inline

the generic hash function

Definition at line 31 of file Hash.h.

31 {
32 const char* p = reinterpret_cast<const char*>( &key );
33 return std::accumulate( p, p + sizeof( T ), std::size_t{0},
34 []( std::size_t res, const char& c ) { return ( res << 1 ) ^ c; } );
35 }
gaudirun.c
c
Definition: gaudirun.py:487
std::size_t
std::accumulate
T accumulate(T... args)

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

- GaudiKernel/GaudiKernel/Hash.h