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:
[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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk