Why does rclcpp have a make_shared function?

asked 2022-03-14 12:42:07 -0600

I can't figure out where it is documented but it seems really odd to me that many of the rclcpp classes use a macro to define a function make_shared that is just an alias for make_shared from the stl. Was the idea here that at some point rclcpp might want to transition to boost::make_shared? The stl make_shared was added to the stl in C++11.

Here is the macro from rclcpp: https://github.com/ros2/rclcpp/blob/f...

There are also the SharedPtr and similar using statements that also seem odd to me. If the intention would be that you could more easily port rclcpp to some system without the stl where are the abstractions for the rest of the stl?

edit retag flag offensive close merge delete

Comments

Introduced by @William in ros2/rclcpp#87. Not sure he still frequents ROS Answers though.

gvdhoorn gravatar image gvdhoorn  ( 2022-03-15 03:34:19 -0600 )edit