From 1f394885035e1775a15cc0ced2450c9b78a25c31 Mon Sep 17 00:00:00 2001 From: AiVerisimilitude <133206333+AiVerisimilitude@users.noreply.github.com> Date: Sat, 2 Sep 2023 02:17:00 +0200 Subject: [PATCH] Fix C++20 allocator construct deprecation (#2292) Signed-off-by: Guilherme Rodrigues (cherry picked from commit fa732b9ee8000714831568e14486099f2714003d) --- rclcpp/include/rclcpp/experimental/intra_process_manager.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclcpp/include/rclcpp/experimental/intra_process_manager.hpp b/rclcpp/include/rclcpp/experimental/intra_process_manager.hpp index 62144ea9bd..a9a35ff624 100644 --- a/rclcpp/include/rclcpp/experimental/intra_process_manager.hpp +++ b/rclcpp/include/rclcpp/experimental/intra_process_manager.hpp @@ -481,8 +481,8 @@ class IntraProcessManager if constexpr (rclcpp::TypeAdapter::is_specialized::value) { ROSMessageTypeAllocator ros_message_alloc(allocator); - auto ptr = ros_message_alloc.allocate(1); - ros_message_alloc.construct(ptr); + auto ptr = ROSMessageTypeAllocatorTraits::allocate(ros_message_alloc, 1); + ROSMessageTypeAllocatorTraits::construct(ros_message_alloc, ptr); ROSMessageTypeDeleter deleter; allocator::set_allocator_for_deleter(&deleter, &allocator); rclcpp::TypeAdapter::convert_to_ros_message(*message, *ptr);