Skip to content

Commit

Permalink
Fix C++20 allocator construct deprecation (#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 Sep 2, 2023
1 parent bc43577 commit fa732b9
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 fa732b9

Please sign in to comment.