diff --git a/src/core/search/rax_tree.h b/src/core/search/rax_tree.h index 267a07680692..743b910170b4 100644 --- a/src/core/search/rax_tree.h +++ b/src/core/search/rax_tree.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -119,7 +120,7 @@ template struct RaxTreeMap { V* old = nullptr; raxRemove(tree_, to_key_ptr(it->first.data()), it->first.size(), reinterpret_cast(&old)); - alloc_.destroy(old); + std::allocator_traits::destroy(alloc_, old); alloc_.deallocate(old, 1); } @@ -144,7 +145,7 @@ std::pair::FindIterator, bool> RaxTreeMap::try_emplace return {it, false}; V* ptr = alloc_.allocate(1); - alloc_.construct(ptr, std::forward(args)...); + std::allocator_traits::construct(alloc_, ptr, std::forward(args)...); V* old = nullptr; raxInsert(tree_, to_key_ptr(key), key.size(), ptr, reinterpret_cast(&old));