let's say I have
class A {
double a;
double Value() const {
return a;
}
double& Value() {
return a;
}
}
//later:
A foo;
double b = foo.Value();
now, the non-const version will be called. Is there a nice way to force the use of the const version? I think it's possible with a cast but I don't think it's very elegant.