The following simple code snippet is correctly rejected by versions 2.95 and 3.2, but is accepted by 3.3: class A { public: int operator()(int i) const { return 0; } }; class B { private: A a; }; int main() { return B().a(0); } This happens with both const and non-const operator(), but doesn't seem to happen with other operators. I tried += and operator[], which both correctly generated errors.
Confirmed with 3.3.4. However, this is already fixed in 3.4.1 and mainline. W.
Adjust milestone
Access control has been reworked on 3.4.x and is known to be bogus in several respect in 3.3.x and previous. Won't fix in 3.3.6. Suggest upgrade to 3.4.x or higher.