Consider the following code :
bool configure (const ConfigElementAbstract& config)
// MyVisitor is inherited from VisitorAbstract
That code don't compile because the accept method is not const. However, semantically I don't want the configure method to modify the config element.
The solution to that problem is to add const to the accept method or to overload the method (one const and the other not const).
Log in to post a comment.