They call free functions and do not alter the state of the class, they should thus be labeled const like isValid or isPersistent.
If those methods are non-const, it's hard to write const-correct downstream code (unless you make the ServiceClient member mutable :disappointed: ).
Your request seems valid to me. Could you send a pull request with the fix? Feel free to ping me from the PR for a review (although I'm not a core ROS reviewer).
The following 3 member functions of ServiceClient are non-const: ServiceClient::getService(), ServiceClient::exists() and ServiceClient::waitForExistence(ros::Duration timeout).
They call free functions and do not alter the state of the class, they should thus be labeled
const
likeisValid
orisPersistent
. If those methods are non-const, it's hard to write const-correct downstream code (unless you make the ServiceClient membermutable
:disappointed: ).