Skip to content

Commit

Permalink
Fix C++20 allocator construct deprecation (#2292) (#2319)
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Rodrigues <guilherme.rodrigues@ait.ac.at>
(cherry picked from commit fa732b9)

Co-authored-by: AiVerisimilitude <133206333+AiVerisimilitude@users.noreply.github.com>
  • Loading branch information
mergify[bot] and AiVerisimilitude authored Sep 27, 2023
1 parent 0f6b544 commit 37f38e3
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 @@ -481,8 +481,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 37f38e3

Please sign in to comment.