Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As you saw in the previous section, the overloaded operators give you a powerful tool to make C++ code more beautiful by treating objects of programmer-defined types similarly to variables of built-in numeric types. There are, however, some limitations that C++ places on the use of overloaded operators. Some of these operations will not limit you much, but some are quite essential. In this section, I will discuss these limitations.
There are some limitations on operator overloading that are not very important for the practicing programmer, at least not at this stage. You cannot overload operator :: (scope), operator .* (member object selector), operator . (class object selector), and operator ?: (conditional operator or arithmetic if). I'm not sure if anybody has a good idea why one needs to overload the scope operator and the conditional operator. The same is true about member object selector and class object selector operators. (Actually, the member object selector operator has not been used here even in its initial meaning.)