Operator Overloading – Introduction to Boost.Operators—Arne Metz

Save to:
Instapaper Pocket Readability

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

You must sign in or register to add a comment.

Comments (1)

0 0

Arne Mertz said on Mar 1, 2015 11:49 AM:

Part 3 is online: [http://arne-mertz.de/2015/03/operator-overloading-introduction-to-boost-operators-part-3/](http://arne-mertz.de/2015/03/operator-overloading-introduction-to-boost-operators-part-3/)