From: Maurizio Vitale (maurizio.vitale_at_[hidden])
Date: 2007-04-21 13:21:13
On Apr 21, 2007, at 8:57 AM, Larry Evans wrote:
> So, to summarize, what you want is:
> proto::and_<> == proto::_
> proto::or_<> == proto::not_<_>
> where == means, "matches the same expressions".
> IOW, _ and not_<_> would be the "ones"
> of the and_ and or_ operators since:
> proto::and_<proto::and_<X0,X1,...,Xn>, proto::_ >
> == proto::and_<X0,X1,...,Xn>
> and likewise for or_ and proto::not_<_>. The zeros
> would be just the reverse. IOW,
> zero one
> ____ ___
> and_: not_<_> _
> or_ : _ not_<_>
This would seem (to me) to be the logical extension, but I leave
to people who have design/used the mpl longer than me to decide
whether it is a good idea.
I'm not sure I understand zeros and ones:
the value which is interesting is the identity. In the case of additions
(and ORs) the identity is a 'zero'. In the case of multiplications
the identity is a 'one'.
The 'other' value (zero for multiplications and one for additions)
only be of interest for simplifying expressions, rather than being
important, but I might miss something here.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk