Boost logo

Boost Users :

Subject: [Boost-users] [operators] operators: +,+= and commutativity
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2011-11-09 10:14:39


Hello *,

I was just considering the operators library to ease implementation effort
of += and + operator overloads. Unfortunately, as I found out operator+ is
implemented in the library for types with commutative property only. In the
docs I see that there are implementations of operators for
subtractable_left, dividable_left and modable_left, but not addable_left.

In my simple case I would like to use the += operator for string based type
to work with my type and string types. What was the design rationale to not
provide the addable_left form?

Many thanks,
Ovanes



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net