📅  最后修改于: 2022-03-11 14:59:31.007000             🧑  作者: Mango
class Foo
{
public:
const int& get() const
{
//non-trivial work
return foo;
}
int& get()
{
return const_cast(const_cast(this)->get());
}
};