Just thought of adding 2 more interesting things about the ::
a) Operator :: is both a unary and a binary operator
struct A{
int m;
};
int x;
int main(){
::x; // Unary
int (A::*p) = &A::m; // Binary
}
b) $10.3/12 - "Explicit qualification with the scope operator (5.1) suppresses the virtual call mechanism."
struct A{
virtual void f(){cout << 1;}
};
struct B : A{
void f(){cout << 2;}
};
int x;
int main(){
B b;
A &ra = b;
ra.f(); // dynamic binding, prints 2
ra.A::f(); // suppress VF mechanism, prints 1.
}