ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It is certainly fine to use std::shared_ptr<>
for new code.
The SharedPtr alias is a legacy from the ros1 days. std::shared_ptr<>
is a relatively recent addition to the c++ standard, and before that the SharedPtr defined by ros was a type alias to a boost library shared pointer class. It saved a lot more typing back then and made it clearer what the code was doing.