Operator overloading allows operators to be redefined and used where one or both of the operands are of a user-defined class. When it’s done correctly, this can simplify the code and make user-defined types as easy to use as the primitive types.
20. Operator Overloading
Get C++20 Quick Syntax Reference: A Pocket Guide to the Language, APIs, and Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.