Name lookup take place before access control
1 2 3 4 5 6 7 8 9 10 11 |
class A { void f(int); public: void f(long); void f(double); }; void g() { A().f(1L); // OK A().f(1.); // OK A().f(10); // error } |
Yes, "1." is a floating point number.