
4 Oct
2011
4 Oct
'11
11:07 p.m.
On Tue, Oct 4, 2011 at 6:50 PM, Nevin Liber <nevin@eviloverlord.com> wrote:
You are assuming that the user intends operator+ to be commutative.
Right, that's one of the requirements we mentioned earlier. The OP mentions, for instance: addable commutative_addable So in other words we wouldn't be requiring or relying on commutativity in all cases, we'd just be providing more powerful bases in addition to the old ones. The user will need some way to specify it as they can if the type of
lhs and rhs are different, and if that assumption is the default, it may break existing code.
Yeah, I think separately named templates that have "commutative" in the name is the easiest way to handle this. -- -Matt Calabrese