ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
747 stars 914 forks source link

Maintain constness of accessed XmlRpcValue struct #2315

Open rhaschke opened 1 year ago

rhaschke commented 1 year ago

Return value should not change constness of this pointer! This augments/completes #1978.

peci1 commented 1 year ago

Just a note: The getter does not change constness of this->. It just returns one non-const value from the const struct (map-like) object. Yes, it seems silly, but the current API allows that. The constness is applied just to the internal pointer, not to the pointed-to value.