We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64dd644 commit 7e9ff5fCopy full SHA for 7e9ff5f
rclcpp/include/rclcpp/loaned_message.hpp
@@ -31,10 +31,10 @@ namespace rclcpp
31
template<typename MessageT, typename AllocatorT = std::allocator<void>>
32
class LoanedMessage
33
{
34
+public:
35
using MessageAllocatorTraits = rclcpp::allocator::AllocRebind<MessageT, AllocatorT>;
36
using MessageAllocator = typename MessageAllocatorTraits::allocator_type;
37
-public:
38
/// Constructor of the LoanedMessage class.
39
/**
40
* The constructor of this class allocates memory for a given message type
@@ -57,7 +57,7 @@ class LoanedMessage
57
*/
58
LoanedMessage(
59
const rclcpp::PublisherBase & pub,
60
- std::allocator<MessageT> allocator)
+ MessageAllocator allocator)
61
: pub_(pub),
62
message_(nullptr),
63
message_allocator_(std::move(allocator))
0 commit comments