Kitware
Open Source
Toggle navigation
About
Pulse in Action
Resources
Publications
Documentation
Blog
Forums
Wiki
Newsletter
Methodology
Anesthesia Machine
Blood Chemistry
Bag Valve Mask
Cardiovascular
Circuit
Drugs
Endocrine
Energy
Environment
Gastrointestinal
Inhaler
Mechancial Ventilator
Nervous
Patient
Renal
Respiratory
Substance Transport
System
Tissue
Downloads
Contact Kitware
Pulse Support
pulse
engine
src
cpp
cdm
utils
EnumHashSpecialization.h
1
/* Distributed under the Apache License, Version 2.0.
2
See accompanying NOTICE file for details.*/
3
4
#pragma once
5
6
#include <functional>
7
8
template
<
typename
E>
9
class
enum_hash
10
{
11
public
:
12
size_t
operator()
(
const
E& e)
const
13
{
14
using
UnderlyingType =
typename
std::underlying_type<E>::type;
15
16
return
std::hash<UnderlyingType>()(
static_cast<
UnderlyingType
>
(e));
17
}
18
};
enum_hash
Definition:
EnumHashSpecialization.h:10
enum_hash::operator()
size_t operator()(const E &e) const
Definition:
EnumHashSpecialization.h:12
Distributed under the
Apache License, Version 2.0
.
See accompanying
NOTICE
file for details.