From 51102d2e59973fde2e8a978ad884255bef3b9f60 Mon Sep 17 00:00:00 2001 From: Kirill Kotliar Date: Thu, 6 Aug 2026 17:28:38 +0300 Subject: [PATCH] add allocator traits --- runtime-common/core/allocator/platform-allocator.h | 4 ++++ runtime-common/core/allocator/script-allocator.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/runtime-common/core/allocator/platform-allocator.h b/runtime-common/core/allocator/platform-allocator.h index 6ae1134683..45b879eef0 100644 --- a/runtime-common/core/allocator/platform-allocator.h +++ b/runtime-common/core/allocator/platform-allocator.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include "runtime-common/core/allocator/runtime-allocator.h" @@ -13,6 +14,9 @@ namespace kphp::memory { template struct platform_allocator { using value_type = T; + using propagate_on_container_copy_assignment = std::true_type; + using propagate_on_container_move_assignment = std::true_type; + using is_always_equal = std::true_type; platform_allocator() noexcept = default; diff --git a/runtime-common/core/allocator/script-allocator.h b/runtime-common/core/allocator/script-allocator.h index 6cc50ca2f1..e3d5e4aeec 100644 --- a/runtime-common/core/allocator/script-allocator.h +++ b/runtime-common/core/allocator/script-allocator.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include "runtime-common/core/allocator/runtime-allocator.h" @@ -15,6 +16,9 @@ namespace memory { template struct script_allocator { using value_type = T; + using propagate_on_container_copy_assignment = std::true_type; + using propagate_on_container_move_assignment = std::true_type; + using is_always_equal = std::true_type; script_allocator() noexcept = default;