Skip to content

Commit

Permalink
Fix C++20 allocator construct deprecation (ros2#2292)
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Rodrigues <guilherme.rodrigues@ait.ac.at>
  • Loading branch information
AiVerisimilitude authored and Barry-Xu-2018 committed Jan 12, 2024
1 parent 4629ee0 commit a15d083
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rclcpp/include/rclcpp/experimental/intra_process_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ class IntraProcessManager

if constexpr (rclcpp::TypeAdapter<MessageT>::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<MessageT>::convert_to_ros_message(*message, *ptr);
Expand Down

0 comments on commit a15d083

Please sign in to comment.