
29 Apr
2007
29 Apr
'07
5:07 p.m.
On 04/29/2007 12:26 PM, Eric Niebler wrote: [snip]
I guess I don't see how these types would be used. In what contexts would using proto::true_ make more sense than using proto::_ ?
Just as someone seeing: mpl::or_<mpl::true_,X> for any X, would expect the same result as: mpl::true_ so someone seeing: matches<Y,proto::or_<proto::true_,X> > for any X and Y, would expect the same result as: matches<Y,proto::true_ > IOW, the name proto::true_ is more consistent with mpl::true_, which is what the OP was suggesting w.r.t. proto::unary_plus and mpl::plus. OTOH, as already mentioned in one of Maurizio's posts, proto::_ is best because it's more consistent with other languages' wildcard character.