阅读背景:

On a nonconst object, why won't C++ call the const version of a method with public-const and private-nonconst overloads?

来源:互联网 
class C
{
public:
    void foo() const {}
private:
    void foo() {}
};

int main()
{
    C c;
    c.foo();
}
class C
{
public:
    void foo() const {}
priva



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: