cginternals / cginternals/cppassist
Provide generic hasher for enum classes
Open
decision required
- Dominant language
- C++
- Stars
- 29
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Possible implementation:
```cpp
template
struct EnumClassHash
{
std::hash::result_type operator()(
const EnumClass & arg) const
{
static std::hash hasher;
return hasher(static_cast(arg));
}
};
```
Possible usage:
```cpp
template <>
struct hash : EnumClassHash {};
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.