- edited description
correct use of const qualifier
Issue #12
resolved
There are some parts of the code where a const qualifier is missing. E.g.:
std::ostream & operator<<(std::ostream & os, Message & message)
Should be:
std::ostream & operator<<(std::ostream & os, const Message & message)
Due to this leads to errors if the caller trys to print a const Message&
.
E.g.:
void SomeClass::print_message() const
{
std::cout << message_ << std::endl; // Error here, even thought this should be correct
}
Comments (5)
-
reporter -
reporter - edited description
-
repo owner -
assigned issue to
-
assigned issue to
-
repo owner Most of the operator<< overloads are not exported, except for Network, so the whole file. But you are right, the signature should be const. Fixed in https://bitbucket.org/tobylorenz/vector_dbc/commits/edf1195edad91bd806aa86b710ec3f9b28c70fc2
Thanks!
-
repo owner - changed status to resolved
- Log in to comment