[ros-users] [Discourse.ros.org] [Packaging and Release Management] C++11 std::shared_ptr in public API

Dave Coleman ros.discourse at gmail.com
Tue Jun 20 14:53:38 UTC 2017



This is a follow-up from our [previous discussion](https://discourse.ros.org/t/std-shared-ptr-in-the-geometric-shapes-public-api/395) about public API and C++11. I would like to propose in ROS-M we remove the no std::shared_ptrs in the public API. Remove from REP-003:

> The API of the packages included in desktop-full will not use any C++11-specific feature

This proposal is motivated by annoying shims that have been put in place to allow MoveIt! to use std::shared_ptrs but still hide them externally. Currently in Lunar we are having the [issue](https://github.com/ros-planning/moveit/issues/506) with urdf_model still [using boost](https://github.com/ros/robot_model/blob/kinetic-devel/urdf/include/urdf/model.h#L68) but urdfdom_headers [using std::shared_ptr](https://github.com/ros/robot_model/blob/kinetic-devel/urdf/urdfdom_compatibility.h.in).

I'm not saying it is mandatory everyone switch to shared_ptrs, but it would be nice for authors/maintainers to have the option even if their package is in desktop-full. Thoughts?





---
[Visit Topic](https://discourse.ros.org/t/c-11-std-shared-ptr-in-public-api/1990/1) or reply to this email to respond.




More information about the ros-users mailing list