关于“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)

详细记录:

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] 错误 2master/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_subscriber1 package had stderr output: examples_rclcpp_minimal_subscriber
ros@ros:~/RobCode/exam_ros2$

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

  1. 使用友元,编译出错fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) 的解决...

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明 http://lihuan-dianxian.blogbus.com/logs/42102230.html 同学拿了个很简单的小程序过 ...

  2. cmake编译出错:No CMAKE_CXX_COMPILER could be found.

    cmake编译出错:No CMAKE_CXX_COMPILER could be found. 错误类似: -- The CXX compiler identification is unknown- ...

  3. 由一次奇怪的编译出错想起的

    现象 最近在工作中遇到了一次奇怪的编译出错.事情是这样的,本来这个asp.net webform应用是可以编译的.但是将另外一个class library的工程加入到这个asp.net webform ...

  4. Xamarin.iOS编译出错

    Xamarin.iOS编译出错 错误信息:C:/Program Files(x86)/Reference Assemblies/Microsoft/Framework/Xamarin.iOS/v1.0 ...

  5. 编译出错libicui18n.so.58: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8‘

    编译出错libicui18n.so.58: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8' 环境 Ubun ...

  6. android 模块不编译错误,Android 编译出错版本匹配问题解决办法

    Android 编译出错版本匹配问题解决办法 解决问题的关键在于版本匹配, compileSdkVersion compileSdkVersion targetSdkVersion 这三个参数的整数值 ...

  7. saki4510t的UVCCamera设置匹配android7.1.1 sdk等信息后编译出错

    采用的代码来之于https://github.com/saki4510t/UVCCamera 此工程Sdk等版本信息定义 1.1 minSdkVersion 1.2 targetSdkVersion ...

  8. 杀毒软件引起的WinCE编译出错问题

    最近发现选择PB6.0的Rebuild Current BSP And Subprojects来编译整个BSP包的时候,基本都会弹出下面的编译出错信息: 图1 刚开始还以为是VS2005出问题了,就关 ...

  9. 解决WINCE6.0新建工程编译出错的问题

    ********************************LoongEmbedded******************************** 作者:LoongEmbedded(kandi ...

最新文章

  1. 2022-2028年中国汽车塑料行业市场深度分析及投资趋势预测报告
  2. DevOps:软件架构师行动指南3.1 概述
  3. java try catch 捕捉异常_java的 try-catch异常捕捉处理
  4. php 防止按住f5不松,WordPress如何防御(频繁F5刷新)的解决方法
  5. Web应用扫描测试工具Vega
  6. vue父组件ajax改变数据,vue父组件传了变量给子组件,改变子组件的对象时,父组件也跟着改变...
  7. 蚂蚁金服 Service Mesh 实践探索
  8. cerely异步分布式
  9. apache mediawiki 安装_如何在CentOS 7上安装MediaWiki
  10. css3 -- 过渡与动画
  11. P3381 【模板】最小费用最大流
  12. python必备基础代码-机器学习算法基础(使用Python代码)
  13. python中的join函数连接dataframe_python pandas处理CSV文件并使用join()方法拼接两个dataframe...
  14. 勒索老黄未果!黑客公布英伟达核心源代码,超40万个文件、75GB机密数据
  15. ubuntu12 环境下编译freerdp
  16. Valgrind User Manual
  17. Win7 没有声音的解决方法
  18. 傻子都能看懂的 财务报表入门
  19. SD卡学习(SDIO和SPI模式)
  20. Android NFC读MifareClassic卡获取卡片ID 类型 扇区 存储空间

热门文章

  1. 66.android 导入项目报错Error:Execution failed for task ':app:validateDebugSigning'. Keystore file F:\myA
  2. HiBench算法简介
  3. maven项目集成swagger3生成json和yaml格式的openapi文件
  4. 【网络安全常用术语解读】CWE详解
  5. 炉石android更新日志,炉石传说新版本一览_炉石传说更新内容
  6. Dijkstra算法总结
  7. 以前flyback的osdiy
  8. Shell脚本之网络流量监控
  9. python函数整理_python内置函数整理
  10. 2.3.1 导引型传输媒体