Arne Mertz goes into the details of using boost operators.
Operator Overloading – Introduction to Boost.Operators, Part 1
Operator Overloading – Introduction to Boost.Operators, Part 2
by Arne Mertz
From the articles:
In my first two posts about operator overloading I have written about the basics and common practice. This post shows some lessons from the common practice post on a concrete example and then introduces to Boost.Operators, a library that conveniently reduces the boilerplate involved when overloading multiple operators for a class.
Operators Travel in Packs
If we look at the list of operators, we see that there are about 50 of them, and many of them can be overloaded in different ways. Even if we restrict ourselves to a few operations that make sense for a given class, then one of those operations often brings two or more operators.
Add a Comment
Comments are closed.