Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-04-29 13:07:46

On 04/29/2007 12:26 PM, Eric Niebler wrote:
> 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:


for any X, would expect the same result as:


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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at