FWCore
Utilities
interface
hash_combine.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_hash_combine_h
2
#define FWCore_Utilities_hash_combine_h
3
// -*- C++ -*-
4
//
5
// Package: FWCore/Utilities
6
// Class : hash_combine
7
//
20
// system include files
21
#include <functional>
22
23
namespace
edm
{
24
template
<
typename
T>
25
inline
void
hash_combine
(std::size_t&
seed
,
const
T
&
val
) {
26
seed
^= std::hash<T>()(
val
) + 0x9e3779b9 + (
seed
<< 6) + (
seed
>> 2);
27
}
28
29
template
<
typename
T
,
typename
...
Types
>
30
inline
void
hash_combine
(std::size_t&
seed
,
const
T
&
val
,
const
Types
&...
args
) {
31
hash_combine
(
seed
,
val
);
32
hash_combine
(
seed
,
args
...);
33
}
34
35
template
<
typename
...
Types
>
36
inline
std::size_t
hash_value
(
const
Types
&...
args
) {
37
std::size_t
seed
{0};
38
hash_combine
(
seed
,
args
...);
39
return
seed
;
40
}
41
42
}
// namespace edm
43
#endif
edm::hash_value
std::size_t hash_value(const Types &... args)
Definition:
hash_combine.h:36
writedatasetfile.args
args
Definition:
writedatasetfile.py:18
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::hash_combine
void hash_combine(std::size_t &seed, const T &val)
Definition:
hash_combine.h:25
fileCollector.seed
seed
Definition:
fileCollector.py:127
Types
Definition:
Types.py:1
heppy_batch.val
val
Definition:
heppy_batch.py:351
T
long double T
Definition:
Basic3DVectorLD.h:48
Generated for CMSSW Reference Manual by
1.8.16