Why can't we overload the sizeof, :?, :: ., .* operators in c++?
Answer :
The restriction is for safety.For example if we overload . operator then we cant access member in normal way for that we have to use ->.
I think the above answer is not appropriate .
According to me all these operators use name instead of operand ,so we can`t pass any name (either of variable,class) to any function . We must have to pass the operand for that .
 Posted by: Ankur Bamby
Contact Author
Nice answer, but it does not suite for :? operator as it does not take name as parameter. BTW, the reason we cannot overload :? is that it takes 3 argument rather than 2 or 1. There is no mechanism available by which we can pass 3 parameter during operator overloading. For other operators, the previous ans is enough.
 Posted by: Tapesh Maheshwari
Contact Author
In any languages all operator has some precedence, due to precedence they work.like +,-,() all have some precedence, as we know operator overloading work differently without changing the specific meaning of the operator and in this case :,?:, etc. have no predefined precedence.And if we want to overload these operator then compiler does not understand and conflicts, and generates an error.