Skip to content

Commit

Permalink
Fix C++20 allocator construct deprecation (#2292) (#2318)
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Rodrigues <[email protected]>
(cherry picked from commit fa732b9)

Co-authored-by: AiVerisimilitude <[email protected]>
  • Loading branch information
mergify[bot] and AiVerisimilitude authored Sep 28, 2023
1 parent b82da1a commit fbb78ec
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 @@ -483,8 +483,8 @@ class IntraProcessManager

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

0 comments on commit fbb78ec

Please sign in to comment.