Creative Operator Overloading and Proxy Objects

Learn how to use operator overloading and proxy objects to extend the functionality of the pipe operator as an extension method.

Operator overloading

As you might already know, C++ has the ability to overload several operators, including the standard math operators such as plus and minus. Overloaded math operators can be utilized to create custom math classes that behave as numerically built-in types to make the code more readable. Another example is the stream operator, which in the standard library is overloaded to convert the objects to streams, as shown here:

Get hands-on with 1200+ tech skills courses.