|
Boost : |
Subject: Re: [boost] [operators] The future
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-10-04 19:07:16
On Tue, Oct 4, 2011 at 6:50 PM, Nevin Liber <nevin_at_[hidden]> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk