class C { public: void foo() const {} private: void foo() {} }; int main() { C c; c.foo(); }
MSVC 2013 doesn\'t like this:
The object is not const, so the non-const overload is a better match. Overload resolution happens before access checking. This ensures that overload resolution is not inadvertently changed by changing the access of a member function.
const