Home > Q&A > body text
迷茫2017-04-17 14:58:29
There is no particularly good way. You can call a const member function through a temporary const reference.
int main() { A a; const A& b = a; b.getI(); }