mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-06 08:46:42 +08:00
Handled review notes.
This commit is contained in:
parent
8aa4bffb22
commit
9517c4879c
4
enum.h
4
enum.h
@ -1283,17 +1283,15 @@ BETTER_ENUMS_CONSTEXPR_ map<Enum, T> make_map(T (*f)(Enum))
|
||||
|
||||
}
|
||||
|
||||
#ifndef BETTER_ENUMS_DECLARE_STD_HASH
|
||||
#define BETTER_ENUMS_DECLARE_STD_HASH(type) \
|
||||
namespace std { \
|
||||
template <> struct hash<type> \
|
||||
{ \
|
||||
size_t operator()(const type &x) const \
|
||||
{ \
|
||||
return std::hash<size_t>()(x._to_index()); \
|
||||
return std::hash<size_t>()(x._to_integral()); \
|
||||
} \
|
||||
}; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // #ifndef BETTER_ENUMS_ENUM_H
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user