@@ -75,13 +75,25 @@ using PublisherOptionsWithAllocator = rclcpp::PublisherOptionsWithAllocator<Allo
7575template <typename AllocatorT>
7676using SubscriptionOptionsWithAllocator = rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>;
7777
78+ namespace detail
79+ {
80+
81+ template <typename AllocatorT>
82+ PublisherOptionsWithAllocator<AllocatorT>
83+ create_default_publisher_options ()
84+ {
85+ return rclcpp::PublisherOptionsWithAllocator<AllocatorT>();
86+ }
87+
7888template <typename AllocatorT>
7989SubscriptionOptionsWithAllocator<AllocatorT>
8090create_default_subscription_options ()
8191{
8292 return rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>();
8393}
8494
95+ } // namespace detail
96+
8597// / LifecycleNode for creating lifecycle components
8698/* *
8799 * has lifecycle nodeinterface for configuring this node.
@@ -160,7 +172,7 @@ class LifecycleNode : public node_interfaces::LifecycleNodeInterface,
160172 const std::string & topic_name,
161173 const rclcpp::QoS & qos,
162174 const PublisherOptionsWithAllocator<AllocatorT> & options =
163- PublisherOptionsWithAllocator <AllocatorT>()
175+ detail::create_default_publisher_options <AllocatorT>()
164176 );
165177
166178 // / Create and return a Publisher.
@@ -219,7 +231,7 @@ class LifecycleNode : public node_interfaces::LifecycleNodeInterface,
219231 const rclcpp::QoS & qos,
220232 CallbackT && callback,
221233 const SubscriptionOptionsWithAllocator<AllocatorT> & options =
222- create_default_subscription_options<AllocatorT>(),
234+ detail:: create_default_subscription_options<AllocatorT>(),
223235 typename rclcpp::message_memory_strategy::MessageMemoryStrategy<
224236 typename rclcpp::subscription_traits::has_message_type<CallbackT>::type, AllocatorT
225237 >::SharedPtr
0 commit comments