lundi 5 novembre 2018

C++ - no match for ‘operator<’

I have the following map:

std::map<my_msgs::Nodelet, int> mRunningProcPID;

When trying to insert a new pair to the map I am getting the following error:

error: no match for ‘operator<’ (operand types are ‘const my_msgs::Nodelet_<std::allocator<void> >’ and ‘const my_msgs::Nodelet_<std::allocator<void> >’)
       { return __x < __y; }

I get it that I need to override the < operator for my_msgs::Nodelet, the problem is that I do not have access to that h file since it is being auto generated by ROS.

Any idea what can I do?

Aucun commentaire:

Enregistrer un commentaire