diff --git a/parallel_hashmap/phmap_base.h b/parallel_hashmap/phmap_base.h index 4ff5f07..6b9ea9e 100644 --- a/parallel_hashmap/phmap_base.h +++ b/parallel_hashmap/phmap_base.h @@ -1303,7 +1303,7 @@ constexpr bool HasRebindAlloc(...) { } template -constexpr bool HasRebindAlloc(typename T::template rebind::other*) { +constexpr bool HasRebindAlloc(typename std::allocator_traits::template rebind_alloc*) { return true; } @@ -1527,7 +1527,7 @@ private: template static auto construct_impl(int, A& a, // NOLINT(runtime/references) Args&&... args) - -> decltype(a.construct(std::forward(args)...)) { + -> decltype(std::allocator_traits::construct(a, std::forward(args)...)) { std::allocator_traits::construct(a, std::forward(args)...); } @@ -1538,7 +1538,7 @@ private: template static auto destroy_impl(int, A& a, // NOLINT(runtime/references) - T* p) -> decltype(a.destroy(p)) { + T* p) -> decltype(std::allocator_traits::destroy(a, p)) { std::allocator_traits::destroy(a, p); } template