Name lookup take place before access control

来源:互联网 发布:苹果下载软件 编辑:程序博客网 时间:2024/05/20 22:38


class A {void f(int);public:void f(long);void f(double);};void g() {A().f(1L); // OKA().f(1.); // OKA().f(10); // error}

Yes, "1." is a floating point number.