diff --git a/src/vt/vrt/collection/balance/lb_common.h b/src/vt/vrt/collection/balance/lb_common.h index 4168e2dcd8..b2395aee3a 100644 --- a/src/vt/vrt/collection/balance/lb_common.h +++ b/src/vt/vrt/collection/balance/lb_common.h @@ -79,10 +79,29 @@ enum struct Statistic : int8_t { // InternalEdgesCardinality }; -extern std::unordered_map lb_stat_name_; - } /* end namespace lb */ }}} /* end namespace vt::vrt::collection */ +namespace std { + +using StatisticType = vt::vrt::collection::lb::Statistic; + +template <> +struct hash { + size_t operator()(StatisticType const& in) const { + using StatisticUnderType = typename std::underlying_type::type; + auto const val = static_cast(in); + return std::hash()(val); + } +}; + +} /* end namespace std */ + +namespace vt { namespace vrt { namespace collection { namespace lb { + +extern std::unordered_map lb_stat_name_; + +}}}} /* end namespace vt::vrt::collection::lb */ + #endif /*INCLUDED_VT_VRT_COLLECTION_BALANCE_LB_COMMON_H*/