I guess this is kind of a 'design issue' question. Let's say you have two functions in a class:
Code:
class A{

public:
const void f() const;
int& g();

private:
// stuff ...

};
where g can only modifies A objects through the return type, i.e.,
Code:
int i = a.g();
does not modify the object a. I'd like to call this function from A::f() to get the information and not in a way that modifies the object, i.e.,
Code:
a.g()++;
This is possible but I'm getting warnings about removing the const-ness of the function A::f() ... which I'd rather not have (or is this fine to just not worry about in this case?). So I guess there is something wrong w/ the design of these functions within the class? Is there a better way to design this than just dropping the const-ness from the function A::f()?