From 7870f594660539f48894e37a8fd9d6a133fa21ff Mon Sep 17 00:00:00 2001 From: Vladislav Date: Tue, 15 Oct 2024 22:50:22 +0300 Subject: [PATCH] chore(search): Fix deprecated functions (#3933) Signed-off-by: Vladislav Oleshko --- src/core/search/rax_tree.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/search/rax_tree.h b/src/core/search/rax_tree.h index 267a07680..743b91017 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));