Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-05-03 08:42:16


"Arkadiy Vertleyb" <vertleyb_at_[hidden]> wrote

> > > main()
> > > {
> > > BOOST_TYPEOF_ALLOCATE(fun, _1 > 15 && _2 < 20); // <unspecified>
> fun(_1 > 15 && _2 < 20);
> >
> > What's that line supposed to mean?
>
> Shortcut for:
>
> BOOST_TYPEOF(_1 > 15 && _2 < 20) fun(_1 > 15 && _2 < 20);

On the other hand, since a lambda expression returns a default-constructed
functor (does it? -- I am unable to verify it right now) the above doesn't
make a lot of sence for Lambda... One can just write:

BOOST_TYPEOF(_1 > 15 && _2 < 20) fun;

Arkadiy


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