Why does ros takes nodehandle as non const everywhere?
Ros takes nodehanle as non const and non referenced which invokes the copy constructor every time we are passing the the node handle to a function. It may be not that expensive operation, but still it adds little bit given that it has a mutex lock and do lot of vector initialization.
Is there a reason why Ros always tries to invoke copy constructor for node handle and should my program should do the same thing and pass it non const and non referenced which invokes the copy constructor everytime?
This may be my C++ being rusty, but if you're passing by reference, why would the copy-ctor be invoked?
Could you please include some references for this? Where is 'ROS' (an ambiguous thing to state) doing this?