18#ifndef TRINITYCORE_MAP_UTILS_H
19#define TRINITYCORE_MAP_UTILS_H
31 auto itr = map.find(key);
32 if constexpr (std::is_pointer_v<typename M::mapped_type>)
33 return itr != map.end() ? itr->second :
nullptr;
35 return itr != map.end() ? &itr->second :
nullptr;
38template<
class K,
class V,
template<
class,
class,
class...>
class M,
class... Rest>
41 auto range = multimap.equal_range(key);
42 for (
auto itr = range.first; itr != range.second;)
44 if (itr->second == value)
45 itr = multimap.erase(itr);
auto MapGetValuePtr(M &map, typename M::key_type const &key)
void MultimapErasePair(M< K, V, Rest... > &multimap, K const &key, V const &value)