前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >关于“ROS2 Topic-Statistics-Tutorial编译出错”的思考2

关于“ROS2 Topic-Statistics-Tutorial编译出错”的思考2

作者头像
zhangrelay
发布2022-05-01 09:53:51
发布2022-05-01 09:53:51
1.3K00
代码可运行
举报
运行总次数:0
代码可运行

关于“ROS2 Topic-Statistics-Tutorial编译出错”的思考

复现了一下其中报错信息:

如果选foxy会有如上错误,如果选galactic则不会报错,顺利编译完成。

无需修改:set(CMAKE_CXX_STANDARD 17) windows环境: if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") endif(MSVC)

详细记录:

代码语言:javascript
代码运行次数:0
运行
复制
Hello, ROS 1.0 or ROS 2.0? 1=noetic 2=foxy 3=galactic
2
foxy
ros@ros:~/RobCode/exam_ros2$ colcon build
Starting >>> examples_rclcpp_minimal_publisher
Starting >>> examples_rclcpp_minimal_subscriber
Starting >>> launch_testing_examples
Finished <<< launch_testing_examples [0.72s]
Finished <<< examples_rclcpp_minimal_publisher [11.4s]
--- stderr: examples_rclcpp_minimal_subscriber                               
In file included from /usr/include/c++/9/ext/alloc_traits.h:36,
                 from /usr/include/c++/9/bits/basic_string.h:40,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/stdexcept:39,
                 from /usr/include/c++/9/array:39,
                 from /usr/include/c++/9/tuple:39,
                 from /usr/include/c++/9/functional:54,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:15:
/usr/include/c++/9/bits/alloc_traits.h: In instantiation of ‘struct std::allocator_traits<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:47:9:   required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1:   required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75:   required from here
/usr/include/c++/9/bits/alloc_traits.h:400:13: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  400 |       using pointer = _Tp*;
      |             ^~~~~~~
/usr/include/c++/9/bits/alloc_traits.h:403:13: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  403 |       using const_pointer = const _Tp*;
      |             ^~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:80,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:16:
/usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘struct std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:119:18:   required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1:   required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75:   required from here
/usr/include/c++/9/bits/unique_ptr.h:71:9: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   71 |         default_delete(const default_delete<_Up>&) noexcept { }
      |         ^~~~~~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:75:7: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   75 |       operator()(_Tp* __ptr) const
      |       ^~~~~~~~
In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29,
                 from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/executor.hpp:33,
                 from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:18:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp: In instantiation of ‘class rclcpp::AnySubscriptionCallback<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’:
/opt/ros/foxy/include/rclcpp/subscription.hpp:327:57:   required from ‘class rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >’
/usr/include/c++/9/type_traits:1320:45:   required by substitution of ‘template<class _From1, class _To1, class> static std::true_type std::__is_convertible_helper<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*, rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*, false>::__test<_From1, _To1, <template-parameter-1-3> >(int) [with _From1 = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*; _To1 = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*; <template-parameter-1-3> = <missing>]’
/usr/include/c++/9/type_traits:1329:42:   required from ‘struct std::__is_convertible_helper<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*, rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*, false>’
/usr/include/c++/9/type_traits:1335:12:   required from ‘struct std::is_convertible<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*, rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*>’
/usr/include/c++/9/bits/shared_ptr_base.h:927:12:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/9/bits/shared_ptr_base.h:1099:8:   required by substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp> using _Assignable = std::__shared_ptr<_Tp, _Lp>::_Compatible<_Yp, std::__shared_ptr<_Tp, _Lp>&> [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr_base.h:1271:2:   required by substitution of ‘template<class _Yp> std::__shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >, __gnu_cxx::_S_atomic>::_Assignable<_Yp> std::__shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >, __gnu_cxx::_S_atomic>::operator=<_Yp>(std::__shared_ptr<_Tp>&&) [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/usr/include/c++/9/type_traits:1017:12:   required from ‘struct std::is_assignable<std::__shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >, __gnu_cxx::_S_atomic>&, std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > > >’
/usr/include/c++/9/bits/shared_ptr.h:111:8:   required by substitution of ‘template<class _Tp> template<class _Arg> using _Assignable = typename std::enable_if<std::is_assignable<std::__shared_ptr<_Tp>&, _Arg>::value, std::shared_ptr<_Tp>&>::type [with _Arg = std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
/usr/include/c++/9/bits/shared_ptr.h:341:2:   required by substitution of ‘template<class _Yp> std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::_Assignable<std::shared_ptr<_Tp> > std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::operator=<_Yp>(std::shared_ptr<_Tp>&&) [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75:   required from here
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:111:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  111 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   83 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  125 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   97 |   void set(CallbackT callback)
      |        ^~~
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp: In constructor ‘MinimalSubscriber::MinimalSubscriber()’:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75: error: no match for ‘operator=’ (operand types are ‘rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >::SharedPtr’ {aka ‘std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >’} and ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’)
   30 |       "topic", 10, std::bind(&MinimalSubscriber::topic_callback, this, _1));
      |                                                                           ^
In file included from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:16:
/usr/include/c++/9/bits/shared_ptr.h:309:19: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Tp>&) [with _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  309 |       shared_ptr& operator=(const shared_ptr&) noexcept = default;
      |                   ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:309:29: note:   no known conversion for argument 1 from ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ to ‘const std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >&’
  309 |       shared_ptr& operator=(const shared_ptr&) noexcept = default;
      |                             ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:313:2: note: candidate: ‘template<class _Yp> std::shared_ptr<_Tp>::_Assignable<const std::shared_ptr<_Yp>&> std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Yp>&) [with _Yp = _Yp; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  313 |  operator=(const shared_ptr<_Yp>& __r) noexcept
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:313:2: note:   template argument deduction/substitution failed:
/usr/include/c++/9/bits/shared_ptr.h: In substitution of ‘template<class _Tp> template<class _Arg> using _Assignable = typename std::enable_if<std::is_assignable<std::__shared_ptr<_Tp>&, _Arg>::value, std::shared_ptr<_Tp>&>::type [with _Arg = const std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >&; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’:
/usr/include/c++/9/bits/shared_ptr.h:313:2:   required by substitution of ‘template<class _Yp> std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::_Assignable<const std::shared_ptr<_Tp>&> std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::operator=<_Yp>(const std::shared_ptr<_Tp>&) [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75:   required from here
/usr/include/c++/9/bits/shared_ptr.h:111:8: error: no type named ‘type’ in ‘struct std::enable_if<false, std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >&>’
  111 |  using _Assignable = typename enable_if<
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:324:2: note: candidate: ‘template<class _Yp> std::shared_ptr<_Tp>::_Assignable<std::auto_ptr<_Up> > std::shared_ptr<_Tp>::operator=(std::auto_ptr<_Up>&&) [with _Yp = _Yp; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  324 |  operator=(auto_ptr<_Yp>&& __r)
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:324:2: note:   template argument deduction/substitution failed:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75: note:   ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ is not derived from ‘std::auto_ptr<_Up>’
   30 |       "topic", 10, std::bind(&MinimalSubscriber::topic_callback, this, _1));
      |                                                                           ^
In file included from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:16:
/usr/include/c++/9/bits/shared_ptr.h:333:7: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Tp>&&) [with _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  333 |       operator=(shared_ptr&& __r) noexcept
      |       ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:333:30: note:   no known conversion for argument 1 from ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ to ‘std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >&&’
  333 |       operator=(shared_ptr&& __r) noexcept
      |                 ~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/shared_ptr.h:341:2: note: candidate: ‘template<class _Yp> std::shared_ptr<_Tp>::_Assignable<std::shared_ptr<_Yp> > std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Yp>&&) [with _Yp = _Yp; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  341 |  operator=(shared_ptr<_Yp>&& __r) noexcept
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:341:2: note:   substitution of deduced template arguments resulted in errors seen above
/usr/include/c++/9/bits/shared_ptr.h:349:2: note: candidate: ‘template<class _Yp, class _Del> std::shared_ptr<_Tp>::_Assignable<std::unique_ptr<_Up, _Ep> > std::shared_ptr<_Tp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Yp = _Yp; _Del = _Del; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  349 |  operator=(unique_ptr<_Yp, _Del>&& __r)
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:349:2: note:   template argument deduction/substitution failed:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75: note:   ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ is not derived from ‘std::unique_ptr<_Tp, _Dp>’
   30 |       "topic", 10, std::bind(&MinimalSubscriber::topic_callback, this, _1));
      |                                                                           ^
In file included from /usr/include/c++/9/ext/alloc_traits.h:36,
                 from /usr/include/c++/9/bits/stl_construct.h:61,
                 from /usr/include/c++/9/memory:64,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/usr/include/c++/9/bits/alloc_traits.h: In instantiation of ‘struct std::allocator_traits<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:47:9:   required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1:   required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:35:83:   required from here
/usr/include/c++/9/bits/alloc_traits.h:400:13: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  400 |       using pointer = _Tp*;
      |             ^~~~~~~
/usr/include/c++/9/bits/alloc_traits.h:403:13: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  403 |       using const_pointer = const _Tp*;
      |             ^~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:80,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘struct std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:119:18:   required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1:   required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:35:83:   required from here
/usr/include/c++/9/bits/unique_ptr.h:71:9: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   71 |         default_delete(const default_delete<_Up>&) noexcept { }
      |         ^~~~~~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:75:7: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   75 |       operator()(_Tp* __ptr) const
      |       ^~~~~~~~
In file included from /usr/include/c++/9/ext/alloc_traits.h:36,
                 from /usr/include/c++/9/bits/stl_construct.h:61,
                 from /usr/include/c++/9/memory:64,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/alloc_traits.h: In instantiation of ‘struct std::allocator_traits<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:47:9:   required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1:   required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37:   required from here
/usr/include/c++/9/bits/alloc_traits.h:400:13: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  400 |       using pointer = _Tp*;
      |             ^~~~~~~
/usr/include/c++/9/bits/alloc_traits.h:403:13: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  403 |       using const_pointer = const _Tp*;
      |             ^~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:80,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘struct std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:119:18:   required from ‘class rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:91:1:   required by substitution of ‘template<class MessageT, class CallbackT, class AllocatorT, class CallbackMessageT, class SubscriptionT, class MessageMemoryStrategyT> std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37:   required from here
/usr/include/c++/9/bits/unique_ptr.h:71:9: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   71 |         default_delete(const default_delete<_Up>&) noexcept { }
      |         ^~~~~~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:75:7: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   75 |       operator()(_Tp* __ptr) const
      |       ^~~~~~~~
In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29,
                 from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/executor.hpp:33,
                 from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:18:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp: In instantiation of ‘class rclcpp::AnySubscriptionCallback<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’:
/opt/ros/foxy/include/rclcpp/subscription.hpp:327:57:   required from ‘class rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >’
/usr/include/c++/9/type_traits:1320:45:   required by substitution of ‘template<class _From1, class _To1, class> static std::true_type std::__is_convertible_helper<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*, rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*, false>::__test<_From1, _To1, <template-parameter-1-3> >(int) [with _From1 = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*; _To1 = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*; <template-parameter-1-3> = <missing>]’
/usr/include/c++/9/type_traits:1329:42:   required from ‘struct std::__is_convertible_helper<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*, rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*, false>’
/usr/include/c++/9/type_traits:1335:12:   required from ‘struct std::is_convertible<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >*, rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >*>’
/usr/include/c++/9/bits/shared_ptr_base.h:927:12:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/9/bits/shared_ptr_base.h:1099:8:   required by substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp> using _Assignable = std::__shared_ptr<_Tp, _Lp>::_Compatible<_Yp, std::__shared_ptr<_Tp, _Lp>&> [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr_base.h:1271:2:   required by substitution of ‘template<class _Yp> std::__shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >, __gnu_cxx::_S_atomic>::_Assignable<_Yp> std::__shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >, __gnu_cxx::_S_atomic>::operator=<_Yp>(std::__shared_ptr<_Tp>&&) [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/usr/include/c++/9/type_traits:1017:12:   required from ‘struct std::is_assignable<std::__shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >, __gnu_cxx::_S_atomic>&, std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > > >’
/usr/include/c++/9/bits/shared_ptr.h:111:8:   required by substitution of ‘template<class _Tp> template<class _Arg> using _Assignable = typename std::enable_if<std::is_assignable<std::__shared_ptr<_Tp>&, _Arg>::value, std::shared_ptr<_Tp>&>::type [with _Arg = std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
/usr/include/c++/9/bits/shared_ptr.h:341:2:   required by substitution of ‘template<class _Yp> std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::_Assignable<std::shared_ptr<_Tp> > std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::operator=<_Yp>(std::shared_ptr<_Tp>&&) [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37:   required from here
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:111:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  111 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   83 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  125 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   97 |   void set(CallbackT callback)
      |        ^~~
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp: In constructor ‘MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()’:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37: error: no match for ‘operator=’ (operand types are ‘rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >::SharedPtr’ {aka ‘std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >’} and ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’)
   44 |       "topic", 10, callback, options);
      |                                     ^
In file included from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/shared_ptr.h:309:19: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Tp>&) [with _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  309 |       shared_ptr& operator=(const shared_ptr&) noexcept = default;
      |                   ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:309:29: note:   no known conversion for argument 1 from ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ to ‘const std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >&’
  309 |       shared_ptr& operator=(const shared_ptr&) noexcept = default;
      |                             ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:313:2: note: candidate: ‘template<class _Yp> std::shared_ptr<_Tp>::_Assignable<const std::shared_ptr<_Yp>&> std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Yp>&) [with _Yp = _Yp; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  313 |  operator=(const shared_ptr<_Yp>& __r) noexcept
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:313:2: note:   template argument deduction/substitution failed:
/usr/include/c++/9/bits/shared_ptr.h: In substitution of ‘template<class _Tp> template<class _Arg> using _Assignable = typename std::enable_if<std::is_assignable<std::__shared_ptr<_Tp>&, _Arg>::value, std::shared_ptr<_Tp>&>::type [with _Arg = const std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >&; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’:
/usr/include/c++/9/bits/shared_ptr.h:313:2:   required by substitution of ‘template<class _Yp> std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::_Assignable<const std::shared_ptr<_Tp>&> std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >::operator=<_Yp>(const std::shared_ptr<_Tp>&) [with _Yp = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37:   required from here
/usr/include/c++/9/bits/shared_ptr.h:111:8: error: no type named ‘type’ in ‘struct std::enable_if<false, std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >&>’
  111 |  using _Assignable = typename enable_if<
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:324:2: note: candidate: ‘template<class _Yp> std::shared_ptr<_Tp>::_Assignable<std::auto_ptr<_Up> > std::shared_ptr<_Tp>::operator=(std::auto_ptr<_Up>&&) [with _Yp = _Yp; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  324 |  operator=(auto_ptr<_Yp>&& __r)
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:324:2: note:   template argument deduction/substitution failed:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37: note:   ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ is not derived from ‘std::auto_ptr<_Up>’
   44 |       "topic", 10, callback, options);
      |                                     ^
In file included from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/shared_ptr.h:333:7: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Tp>&&) [with _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  333 |       operator=(shared_ptr&& __r) noexcept
      |       ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:333:30: note:   no known conversion for argument 1 from ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ to ‘std::shared_ptr<rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > > >&&’
  333 |       operator=(shared_ptr&& __r) noexcept
      |                 ~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/shared_ptr.h:341:2: note: candidate: ‘template<class _Yp> std::shared_ptr<_Tp>::_Assignable<std::shared_ptr<_Yp> > std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Yp>&&) [with _Yp = _Yp; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  341 |  operator=(shared_ptr<_Yp>&& __r) noexcept
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:341:2: note:   substitution of deduced template arguments resulted in errors seen above
/usr/include/c++/9/bits/shared_ptr.h:349:2: note: candidate: ‘template<class _Yp, class _Del> std::shared_ptr<_Tp>::_Assignable<std::unique_ptr<_Up, _Ep> > std::shared_ptr<_Tp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Yp = _Yp; _Del = _Del; _Tp = rclcpp::Subscription<std_msgs::msg::String_<std::allocator<void> > >]’
  349 |  operator=(unique_ptr<_Yp, _Del>&& __r)
      |  ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:349:2: note:   template argument deduction/substitution failed:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37: note:   ‘std::shared_ptr<rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > > >’ is not derived from ‘std::unique_ptr<_Tp, _Dp>’
   44 |       "topic", 10, callback, options);
      |                                     ^
In file included from /opt/ros/foxy/include/rclcpp/node_interfaces/node_topics_interface.hpp:32,
                 from /opt/ros/foxy/include/rclcpp/node.hpp:55,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:18:
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’:
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75:   required from here
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:97:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >::set(std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>)’
   97 |   any_subscription_callback.set(std::forward<CallbackT>(callback));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29,
                 from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/executor.hpp:33,
                 from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:18:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   83 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:81:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
   81 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   97 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:95:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
   95 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const std_msgs::msg::String_<std::allocator<void> >&, std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&> >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  139 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:137:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
  137 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const std_msgs::msg::String_<std::allocator<void> >&, std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&> >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  153 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:151:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
  151 |     >::type * = nullptr
      |                 ^~~~~~~
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/wait_set_subscriber.cpp: In constructor ‘WaitSetSubscriber::WaitSetSubscriber(rclcpp::NodeOptions)’:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/wait_set_subscriber.cpp:31:58: error: no matching function for call to ‘WaitSetSubscriber::create_callback_group(rclcpp::CallbackGroupType, bool)’
   31 |       rclcpp::CallbackGroupType::MutuallyExclusive, false);
      |                                                          ^
In file included from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/wait_set_subscriber.cpp:18:
/opt/ros/foxy/include/rclcpp/node.hpp:144:3: note: candidate: ‘rclcpp::CallbackGroup::SharedPtr rclcpp::Node::create_callback_group(rclcpp::CallbackGroupType)’
  144 |   create_callback_group(rclcpp::CallbackGroupType group_type);
      |   ^~~~~~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rclcpp/node.hpp:144:3: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
                 from /usr/include/c++/9/bits/allocator.h:46,
                 from /usr/include/c++/9/string:41,
                 from /usr/include/c++/9/stdexcept:39,
                 from /usr/include/c++/9/array:39,
                 from /usr/include/c++/9/tuple:39,
                 from /usr/include/c++/9/functional:54,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:15:
/usr/include/c++/9/ext/new_allocator.h: In instantiation of ‘class __gnu_cxx::new_allocator<const std_msgs::msg::String_<std::allocator<void> >&>’:
/usr/include/c++/9/bits/allocator.h:112:11:   required from ‘class std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>’
/usr/include/c++/9/bits/shared_ptr_base.h:1365:63:   required by substitution of ‘template<class _Yp> struct std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::__void_t<decltype (__enable_shared_from_this_base(declval<const std::__shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp*>()))> > [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1387:21:   required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp2, void>::value), void>::type std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Yp2 = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1345:4:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/9/bits/shared_ptr.h:717:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Args = {std::allocator<void>&}]’
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:68:56:   required from ‘rclcpp::AnySubscriptionCallback<MessageT, Alloc>::AnySubscriptionCallback(std::shared_ptr<_Tp>) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:96:57:   required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75:   required from here
/usr/include/c++/9/ext/new_allocator.h:63:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   63 |       typedef _Tp*       pointer;
      |                          ^~~~~~~
/usr/include/c++/9/ext/new_allocator.h:64:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   64 |       typedef const _Tp* const_pointer;
      |                          ^~~~~~~~~~~~~
In file included from /usr/include/c++/9/string:41,
                 from /usr/include/c++/9/stdexcept:39,
                 from /usr/include/c++/9/array:39,
                 from /usr/include/c++/9/tuple:39,
                 from /usr/include/c++/9/functional:54,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:15:
/usr/include/c++/9/bits/allocator.h: In instantiation of ‘class std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>’:
/usr/include/c++/9/bits/shared_ptr_base.h:1365:63:   required by substitution of ‘template<class _Yp> struct std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::__void_t<decltype (__enable_shared_from_this_base(declval<const std::__shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp*>()))> > [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1387:21:   required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp2, void>::value), void>::type std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Yp2 = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1345:4:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr.h:701:14:   required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}]’
/usr/include/c++/9/bits/shared_ptr.h:717:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Args = {std::allocator<void>&}]’
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:68:56:   required from ‘rclcpp::AnySubscriptionCallback<MessageT, Alloc>::AnySubscriptionCallback(std::shared_ptr<_Tp>) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:96:57:   required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:30:75:   required from here
/usr/include/c++/9/bits/allocator.h:117:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  117 |       typedef _Tp*       pointer;
      |                          ^~~~~~~
/usr/include/c++/9/bits/allocator.h:118:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  118 |       typedef const _Tp* const_pointer;
      |                          ^~~~~~~~~~~~~
In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29,
                 from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/executor.hpp:33,
                 from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp: In instantiation of ‘class rclcpp::AnySubscriptionCallback<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >’:
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:96:57:   required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:35:83:   required from here
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:111:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  111 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   83 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:125:8: error: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’ cannot be overloaded with ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  125 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: previous declaration ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   97 |   void set(CallbackT callback)
      |        ^~~
In file included from /opt/ros/foxy/include/rclcpp/node_interfaces/node_topics_interface.hpp:32,
                 from /opt/ros/foxy/include/rclcpp/node.hpp:55,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’:
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = void (&)(const std_msgs::msg::String_<std::allocator<void> >&); AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:35:83:   required from here
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:97:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >::set(void (&)(const std_msgs::msg::String_<std::allocator<void> >&))’
   97 |   any_subscription_callback.set(std::forward<CallbackT>(callback));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29,
                 from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/executor.hpp:33,
                 from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   83 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:81:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
   81 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   97 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:95:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
   95 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const std_msgs::msg::String_<std::allocator<void> >&, std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&> >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  139 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:137:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
  137 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const std_msgs::msg::String_<std::allocator<void> >&, std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&> >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  153 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:151:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
  151 |     >::type * = nullptr
      |                 ^~~~~~~
In file included from /opt/ros/foxy/include/rclcpp/node_interfaces/node_topics_interface.hpp:32,
                 from /opt/ros/foxy/include/rclcpp/node.hpp:55,
                 from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:18:
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’:
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37:   required from here
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:97:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >::set(MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&)’
   97 |   any_subscription_callback.set(std::forward<CallbackT>(callback));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/foxy/include/rclcpp/subscription_base.hpp:29,
                 from /opt/ros/foxy/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/foxy/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/foxy/include/rclcpp/executor_options.hpp:20,
                 from /opt/ros/foxy/include/rclcpp/executor.hpp:33,
                 from /opt/ros/foxy/include/rclcpp/executors/multi_threaded_executor.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:21,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:18:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   83 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:83:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:81:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
   81 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
   97 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:97:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:95:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
   95 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const std_msgs::msg::String_<std::allocator<void> >&, std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&> >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  139 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:139:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:137:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
  137 |     >::type * = nullptr
      |                 ^~~~~~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note: candidate: ‘template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<const std_msgs::msg::String_<std::allocator<void> >&, std::default_delete<const std_msgs::msg::String_<std::allocator<void> >&> >, const rclcpp::MessageInfo&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>, const rclcpp::MessageInfo&)> >::value>::type* <anonymous> = <enumerator>; MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
  153 |   void set(CallbackT callback)
      |        ^~~
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:153:8: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:151:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
  151 |     >::type * = nullptr
      |                 ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
                 from /usr/include/c++/9/bits/allocator.h:46,
                 from /usr/include/c++/9/memory:63,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/ext/new_allocator.h: In instantiation of ‘class __gnu_cxx::new_allocator<const std_msgs::msg::String_<std::allocator<void> >&>’:
/usr/include/c++/9/bits/allocator.h:112:11:   required from ‘class std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>’
/usr/include/c++/9/bits/shared_ptr_base.h:1365:63:   required by substitution of ‘template<class _Yp> struct std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::__void_t<decltype (__enable_shared_from_this_base(declval<const std::__shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp*>()))> > [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1387:21:   required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp2, void>::value), void>::type std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Yp2 = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1345:4:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/9/bits/shared_ptr.h:717:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Args = {std::allocator<void>&}]’
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:68:56:   required from ‘rclcpp::AnySubscriptionCallback<MessageT, Alloc>::AnySubscriptionCallback(std::shared_ptr<_Tp>) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:96:57:   required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37:   required from here
/usr/include/c++/9/ext/new_allocator.h:63:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   63 |       typedef _Tp*       pointer;
      |                          ^~~~~~~
/usr/include/c++/9/ext/new_allocator.h:64:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   64 |       typedef const _Tp* const_pointer;
      |                          ^~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:63,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/allocator.h: In instantiation of ‘class std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>’:
/usr/include/c++/9/bits/shared_ptr_base.h:1365:63:   required by substitution of ‘template<class _Yp> struct std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::__void_t<decltype (__enable_shared_from_this_base(declval<const std::__shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp*>()))> > [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1387:21:   required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp2, void>::value), void>::type std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Yp2 = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1345:4:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr.h:701:14:   required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}]’
/usr/include/c++/9/bits/shared_ptr.h:717:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Args = {std::allocator<void>&}]’
/opt/ros/foxy/include/rclcpp/any_subscription_callback.hpp:68:56:   required from ‘rclcpp::AnySubscriptionCallback<MessageT, Alloc>::AnySubscriptionCallback(std::shared_ptr<_Tp>) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/subscription_factory.hpp:96:57:   required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/create_subscription.hpp:144:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; NodeT = rclcpp::Node&; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node_impl.hpp:98:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:44:37:   required from here
/usr/include/c++/9/bits/allocator.h:117:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  117 |       typedef _Tp*       pointer;
      |                          ^~~~~~~
/usr/include/c++/9/bits/allocator.h:118:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  118 |       typedef const _Tp* const_pointer;
      |                          ^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
                 from /usr/include/c++/9/bits/allocator.h:46,
                 from /usr/include/c++/9/memory:63,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/usr/include/c++/9/ext/new_allocator.h: In instantiation of ‘class __gnu_cxx::new_allocator<const std_msgs::msg::String_<std::allocator<void> >&>’:
/usr/include/c++/9/bits/allocator.h:112:11:   required from ‘class std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>’
/usr/include/c++/9/bits/shared_ptr_base.h:1365:63:   required by substitution of ‘template<class _Yp> struct std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::__void_t<decltype (__enable_shared_from_this_base(declval<const std::__shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp*>()))> > [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1387:21:   required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp2, void>::value), void>::type std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Yp2 = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1345:4:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr.h:701:14:   [ skipping 7 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Args = {std::shared_ptr<std::allocator<void> >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Args = {std::shared_ptr<std::allocator<void> >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/usr/include/c++/9/bits/shared_ptr.h:701:14:   required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Args = {std::shared_ptr<std::allocator<void> >}]’
/usr/include/c++/9/bits/shared_ptr.h:717:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; _Args = {std::shared_ptr<std::allocator<void> >}]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:80:68:   required from ‘static rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::create_default() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>; rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node.hpp:220:45:   required from here
/usr/include/c++/9/ext/new_allocator.h:63:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   63 |       typedef _Tp*       pointer;
      |                          ^~~~~~~
/usr/include/c++/9/ext/new_allocator.h:64:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
   64 |       typedef const _Tp* const_pointer;
      |                          ^~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:63,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/usr/include/c++/9/bits/allocator.h: In instantiation of ‘class std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>’:
/usr/include/c++/9/bits/shared_ptr_base.h:1365:63:   required by substitution of ‘template<class _Yp> struct std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::__void_t<decltype (__enable_shared_from_this_base(declval<const std::__shared_count<__gnu_cxx::_S_atomic>&>(), declval<_Yp*>()))> > [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1387:21:   required by substitution of ‘template<class _Yp, class _Yp2> typename std::enable_if<(! std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::__has_esft_base<_Yp2, void>::value), void>::type std::__shared_ptr<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>, __gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with _Yp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Yp2 = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr_base.h:1345:4:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}; _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>]’
/usr/include/c++/9/bits/shared_ptr.h:701:14:   required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = std::allocator<const std_msgs::msg::String_<std::allocator<void> >&>; _Alloc = std::allocator<std::allocator<const std_msgs::msg::String_<std::allocator<void> >&> >; _Args = {std::allocator<void>&}]’
/usr/include/c++/9/bits/shared_ptr.h:717:39:   [ skipping 6 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/9/bits/shared_ptr_base.h:1344:71:   required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Args = {std::shared_ptr<std::allocator<void> >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/usr/include/c++/9/bits/shared_ptr.h:359:59:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Args = {std::shared_ptr<std::allocator<void> >}; _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >]’
/usr/include/c++/9/bits/shared_ptr.h:701:14:   required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; _Alloc = std::allocator<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; _Args = {std::shared_ptr<std::allocator<void> >}]’
/usr/include/c++/9/bits/shared_ptr.h:717:39:   required from ‘std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; _Args = {std::shared_ptr<std::allocator<void> >}]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:80:68:   required from ‘static rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::create_default() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>; rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]’
/opt/ros/foxy/include/rclcpp/node.hpp:220:45:   required from here
/usr/include/c++/9/bits/allocator.h:117:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  117 |       typedef _Tp*       pointer;
      |                          ^~~~~~~
/usr/include/c++/9/bits/allocator.h:118:26: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
  118 |       typedef const _Tp* const_pointer;
      |                          ^~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/shared_ptr.h:52,
                 from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:16:
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>’:
/usr/include/c++/9/bits/shared_ptr_base.h:1080:11:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1012:7: error: forming pointer to reference type ‘std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1012 |       operator->() const noexcept
      |       ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1020:7: error: forming pointer to reference type ‘std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1020 |       _M_get() const noexcept
      |       ^~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1094 |  using _Compatible = typename
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1104 |  using _UniqCompatible = typename enable_if<__and_<
      |        ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1162:2: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1162 |  __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r,
      |  ^~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Res> using _Compatible = typename std::enable_if<std::__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type [with _Yp = _Yp; _Res = void; _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1172:2:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1094 |  using _Compatible = typename
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Del, class _Res, class _Ptr> using _UniqCompatible = typename std::enable_if<std::__and_<std::__sp_compatible_with<_Yp*, _Tp*>, std::is_convertible<_Ptr, typename std::remove_extent<_Up>::type*> >::value, _Res>::type [with _Yp = _Yp; _Del = _Del; _Res = void; _Ptr = typename std::unique_ptr<_Tp, _Dp>::pointer; _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1203:2:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1104 |  using _UniqCompatible = typename enable_if<__and_<
      |        ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1219:2: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1219 |  __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete)
      |  ^~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1309:7: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1309 |       get() const noexcept
      |       ^~~
/usr/include/c++/9/bits/shared_ptr_base.h:1404:24: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1404 |       element_type*    _M_ptr;         // Contained pointer.
      |                        ^~~~~~
In file included from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:16:
/usr/include/c++/9/bits/shared_ptr.h: In instantiation of ‘class std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr.h:234:2: error: forming pointer to reference type ‘std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
  234 |  shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept
      |  ^~~~~~~~~~
In file included from /usr/include/c++/9/bits/shared_ptr.h:52,
                 from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:16:
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘constexpr std::__shared_ptr<_Tp, _Lp>::__shared_ptr() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1287:9:   required from ‘void std::__shared_ptr<_Tp, _Lp>::reset() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5:   required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1119:32: error: using invalid field ‘std::__shared_ptr<_Tp, _Lp>::_M_ptr’
 1119 |       : _M_ptr(0), _M_refcount()
      |                                ^
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘void std::__shared_ptr<_Tp, _Lp>::swap(std::__shared_ptr<_Tp, _Lp>&) [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1287:24:   required from ‘void std::__shared_ptr<_Tp, _Lp>::reset() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5:   required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1326:12: error: using invalid field ‘std::__shared_ptr<_Tp, _Lp>::_M_ptr’
 1326 |  std::swap(_M_ptr, __other._M_ptr);
      |            ^~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1326:28: error: ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’ has no member named ‘_M_ptr’
 1326 |  std::swap(_M_ptr, __other._M_ptr);
      |                    ~~~~~~~~^~~~~~
In file included from /usr/include/c++/9/functional:59,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function.cpp:15:
/usr/include/c++/9/bits/std_function.h: At global scope:
/usr/include/c++/9/bits/std_function.h:667:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = std::shared_ptr<rclcpp::SubscriptionBase>; _ArgTypes = {rclcpp::node_interfaces::NodeBaseInterface*, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const rclcpp::QoS&}]’, declared using local type ‘rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = std::_Bind<void (MinimalSubscriber::*(MinimalSubscriber*, std::_Placeholder<1>))(const std_msgs::msg::String_<std::allocator<void> >&) const>; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>’, is used but never defined [-fpermissive]
  667 |       function<_Res(_ArgTypes...)>::
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/subscriber_member_function.dir/build.make:63:CMakeFiles/subscriber_member_function.dir/member_function.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:146:CMakeFiles/subscriber_member_function.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
In file included from /usr/include/c++/9/bits/shared_ptr.h:52,
                 from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>’:
/usr/include/c++/9/bits/shared_ptr_base.h:1080:11:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1012:7: error: forming pointer to reference type ‘std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1012 |       operator->() const noexcept
      |       ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1020:7: error: forming pointer to reference type ‘std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1020 |       _M_get() const noexcept
      |       ^~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1094 |  using _Compatible = typename
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1104 |  using _UniqCompatible = typename enable_if<__and_<
      |        ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1162:2: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1162 |  __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r,
      |  ^~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Res> using _Compatible = typename std::enable_if<std::__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type [with _Yp = _Yp; _Res = void; _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1172:2:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1094 |  using _Compatible = typename
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Del, class _Res, class _Ptr> using _UniqCompatible = typename std::enable_if<std::__and_<std::__sp_compatible_with<_Yp*, _Tp*>, std::is_convertible<_Ptr, typename std::remove_extent<_Up>::type*> >::value, _Res>::type [with _Yp = _Yp; _Del = _Del; _Res = void; _Ptr = typename std::unique_ptr<_Tp, _Dp>::pointer; _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1203:2:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1104 |  using _UniqCompatible = typename enable_if<__and_<
      |        ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1219:2: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1219 |  __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete)
      |  ^~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1309:7: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1309 |       get() const noexcept
      |       ^~~
/usr/include/c++/9/bits/shared_ptr_base.h:1404:24: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1404 |       element_type*    _M_ptr;         // Contained pointer.
      |                        ^~~~~~
In file included from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/shared_ptr.h: In instantiation of ‘class std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr.h:234:2: error: forming pointer to reference type ‘std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
  234 |  shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept
      |  ^~~~~~~~~~
In file included from /usr/include/c++/9/bits/shared_ptr.h:52,
                 from /usr/include/c++/9/memory:81,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:16:
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘constexpr std::__shared_ptr<_Tp, _Lp>::__shared_ptr() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1287:9:   required from ‘void std::__shared_ptr<_Tp, _Lp>::reset() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5:   required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1119:32: error: using invalid field ‘std::__shared_ptr<_Tp, _Lp>::_M_ptr’
 1119 |       : _M_ptr(0), _M_refcount()
      |                                ^
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘void std::__shared_ptr<_Tp, _Lp>::swap(std::__shared_ptr<_Tp, _Lp>&) [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1287:24:   required from ‘void std::__shared_ptr<_Tp, _Lp>::reset() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5:   required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1326:12: error: using invalid field ‘std::__shared_ptr<_Tp, _Lp>::_M_ptr’
 1326 |  std::swap(_M_ptr, __other._M_ptr);
      |            ^~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1326:28: error: ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’ has no member named ‘_M_ptr’
 1326 |  std::swap(_M_ptr, __other._M_ptr);
      |                    ~~~~~~~~^~~~~~
In file included from /usr/include/c++/9/future:48,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:18,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/member_function_with_topic_statistics.cpp:18:
/usr/include/c++/9/bits/std_function.h: At global scope:
/usr/include/c++/9/bits/std_function.h:667:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = std::shared_ptr<rclcpp::SubscriptionBase>; _ArgTypes = {rclcpp::node_interfaces::NodeBaseInterface*, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const rclcpp::QoS&}]’, declared using local type ‘rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<CallbackMessageT> >) [with MessageT = std_msgs::msg::String_<std::allocator<void> >; CallbackT = MinimalSubscriberWithTopicStatistics::MinimalSubscriberWithTopicStatistics()::<lambda(const String&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = const std_msgs::msg::String_<std::allocator<void> >&; SubscriptionT = rclcpp::Subscription<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<const std_msgs::msg::String_<std::allocator<void> >&, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>’, is used but never defined [-fpermissive]
  667 |       function<_Res(_ArgTypes...)>::
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/shared_ptr.h:52,
                 from /usr/include/c++/9/memory:81,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>’:
/usr/include/c++/9/bits/shared_ptr_base.h:1080:11:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1012:7: error: forming pointer to reference type ‘std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1012 |       operator->() const noexcept
      |       ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1020:7: error: forming pointer to reference type ‘std::__shared_ptr_access<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1020 |       _M_get() const noexcept
      |       ^~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1094 |  using _Compatible = typename
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1104 |  using _UniqCompatible = typename enable_if<__and_<
      |        ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1162:2: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1162 |  __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r,
      |  ^~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Res> using _Compatible = typename std::enable_if<std::__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type [with _Yp = _Yp; _Res = void; _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1172:2:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1094:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1094 |  using _Compatible = typename
      |        ^~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In substitution of ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> template<class _Yp, class _Del, class _Res, class _Ptr> using _UniqCompatible = typename std::enable_if<std::__and_<std::__sp_compatible_with<_Yp*, _Tp*>, std::is_convertible<_Ptr, typename std::remove_extent<_Up>::type*> >::value, _Res>::type [with _Yp = _Yp; _Del = _Del; _Res = void; _Ptr = typename std::unique_ptr<_Tp, _Dp>::pointer; _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1203:2:   required from ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1104:8: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1104 |  using _UniqCompatible = typename enable_if<__and_<
      |        ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1219:2: error: forming pointer to reference type ‘const std_msgs::msg::String_<std::allocator<void> >&’
 1219 |  __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete)
      |  ^~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1309:7: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1309 |       get() const noexcept
      |       ^~~
/usr/include/c++/9/bits/shared_ptr_base.h:1404:24: error: forming pointer to reference type ‘std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
 1404 |       element_type*    _M_ptr;         // Contained pointer.
      |                        ^~~~~~
In file included from /usr/include/c++/9/memory:81,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/usr/include/c++/9/bits/shared_ptr.h: In instantiation of ‘class std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>’:
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   recursively required from ‘std::shared_ptr<_Tp> rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::borrow_message() [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:85:37:   required from here
/usr/include/c++/9/bits/shared_ptr.h:234:2: error: forming pointer to reference type ‘std::shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&>::element_type’ {aka ‘const std_msgs::msg::String_<std::allocator<void> >&’}
  234 |  shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept
      |  ^~~~~~~~~~
In file included from /usr/include/c++/9/bits/shared_ptr.h:52,
                 from /usr/include/c++/9/memory:81,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:144,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/not_composable.cpp:15:
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘constexpr std::__shared_ptr<_Tp, _Lp>::__shared_ptr() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1287:9:   required from ‘void std::__shared_ptr<_Tp, _Lp>::reset() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5:   required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1119:32: error: using invalid field ‘std::__shared_ptr<_Tp, _Lp>::_M_ptr’
 1119 |       : _M_ptr(0), _M_refcount()
      |                                ^
/usr/include/c++/9/bits/shared_ptr_base.h: In instantiation of ‘void std::__shared_ptr<_Tp, _Lp>::swap(std::__shared_ptr<_Tp, _Lp>&) [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’:
/usr/include/c++/9/bits/shared_ptr_base.h:1287:24:   required from ‘void std::__shared_ptr<_Tp, _Lp>::reset() [with _Tp = const std_msgs::msg::String_<std::allocator<void> >&; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:109:5:   required from ‘void rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::return_message(std::shared_ptr<_Tp>&) [with MessageT = const std_msgs::msg::String_<std::allocator<void> >&; Alloc = std::allocator<void>]’
/opt/ros/foxy/include/rclcpp/message_memory_strategy.hpp:107:16:   required from here
/usr/include/c++/9/bits/shared_ptr_base.h:1326:12: error: using invalid field ‘std::__shared_ptr<_Tp, _Lp>::_M_ptr’
 1326 |  std::swap(_M_ptr, __other._M_ptr);
      |            ^~~~~~
/usr/include/c++/9/bits/shared_ptr_base.h:1326:28: error: ‘class std::__shared_ptr<const std_msgs::msg::String_<std::allocator<void> >&, __gnu_cxx::_S_atomic>’ has no member named ‘_M_ptr’
 1326 |  std::swap(_M_ptr, __other._M_ptr);
      |                    ~~~~~~~~^~~~~~
make[2]: *** [CMakeFiles/subscriber_member_function_with_topic_statistics.dir/build.make:63:CMakeFiles/subscriber_member_function_with_topic_statistics.dir/member_function_with_topic_statistics.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:173:CMakeFiles/subscriber_member_function_with_topic_statistics.dir/all] 错误 2

master/rclcpp/topics/minimal_subscriber/time_triggered_wait_set_subscriber.cpp: In constructor ‘TimeTriggeredWaitSetSubscriber::TimeTriggeredWaitSetSubscriber(rclcpp::NodeOptions)’:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/time_triggered_wait_set_subscriber.cpp:33:58: error: no matching function for call to ‘TimeTriggeredWaitSetSubscriber::create_callback_group(rclcpp::CallbackGroupType, bool)’
   33 |       rclcpp::CallbackGroupType::MutuallyExclusive, false);
      |                                                          ^
In file included from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/time_triggered_wait_set_subscriber.cpp:18:
/opt/ros/foxy/include/rclcpp/node.hpp:144:3: note: candidate: ‘rclcpp::CallbackGroup::SharedPtr rclcpp::Node::create_callback_group(rclcpp::CallbackGroupType)’
  144 |   create_callback_group(rclcpp::CallbackGroupType group_type);
      |   ^~~~~~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rclcpp/node.hpp:144:3: note:   candidate expects 1 argument, 2 provided
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/static_wait_set_subscriber.cpp: In lambda function:
/home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/static_wait_set_subscriber.cpp:36:62: error: no matching function for call to ‘StaticWaitSetSubscriber::create_callback_group(rclcpp::CallbackGroupType, bool)’
   36 |           rclcpp::CallbackGroupType::MutuallyExclusive, false);
      |                                                              ^
In file included from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/executors.hpp:22,
                 from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146,
                 from /home/ros/RobCode/exam_ros2/src/examples-master/rclcpp/topics/minimal_subscriber/static_wait_set_subscriber.cpp:18:
/opt/ros/foxy/include/rclcpp/node.hpp:144:3: note: candidate: ‘rclcpp::CallbackGroup::SharedPtr rclcpp::Node::create_callback_group(rclcpp::CallbackGroupType)’
  144 |   create_callback_group(rclcpp::CallbackGroupType group_type);
      |   ^~~~~~~~~~~~~~~~~~~~~
/opt/ros/foxy/include/rclcpp/node.hpp:144:3: note:   candidate expects 1 argument, 2 provided
make[2]: *** [CMakeFiles/wait_set_subscriber_library.dir/build.make:89:CMakeFiles/wait_set_subscriber_library.dir/time_triggered_wait_set_subscriber.cpp.o] 错误 1
make[2]: *** [CMakeFiles/wait_set_subscriber_library.dir/build.make:76:CMakeFiles/wait_set_subscriber_library.dir/static_wait_set_subscriber.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:254:CMakeFiles/wait_set_subscriber_library.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2
---
Failed   <<< examples_rclcpp_minimal_subscriber [14.4s, exited with code 2]
                                 
Summary: 2 packages finished [14.6s]
  1 package failed: examples_rclcpp_minimal_subscriber
  1 package had stderr output: examples_rclcpp_minimal_subscriber
ros@ros:~/RobCode/exam_ros2$ 
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-03-05,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档