Skip to content

Commit fa732b9

Browse files
Fix C++20 allocator construct deprecation (ros2#2292)
Signed-off-by: Guilherme Rodrigues <[email protected]>
1 parent bc43577 commit fa732b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rclcpp/include/rclcpp/experimental/intra_process_manager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ class IntraProcessManager
488488

489489
if constexpr (rclcpp::TypeAdapter<MessageT>::is_specialized::value) {
490490
ROSMessageTypeAllocator ros_message_alloc(allocator);
491-
auto ptr = ros_message_alloc.allocate(1);
492-
ros_message_alloc.construct(ptr);
491+
auto ptr = ROSMessageTypeAllocatorTraits::allocate(ros_message_alloc, 1);
492+
ROSMessageTypeAllocatorTraits::construct(ros_message_alloc, ptr);
493493
ROSMessageTypeDeleter deleter;
494494
allocator::set_allocator_for_deleter(&deleter, &allocator);
495495
rclcpp::TypeAdapter<MessageT>::convert_to_ros_message(*message, *ptr);

0 commit comments

Comments
 (0)