Boost logo

Boost Users :

Subject: Re: [Boost-users] Writing an inline nullary function object?
From: Kamil Zubair (kamilzubair_at_[hidden])
Date: 2010-12-02 04:36:31


Using lambda::var is a good trick. I usually used this:

bind(ref, x)

It works, but I always find it kind a ugly.
Thanks for the pointer :)

--- Pada Rab, 1/12/10, Robert Jones <robertgbjones_at_[hidden]> menulis:

Dari: Robert Jones <robertgbjones_at_[hidden]>
Judul: Re: [Boost-users] Writing an inline nullary function object?
Kepada: boost-users_at_[hidden]
Tanggal: Rabu, 1 Desember, 2010, 4:22 PM

On Wed, Dec 1, 2010 at 6:35 PM, Eric MALENFANT <Eric.Malenfant_at_[hidden]> wrote:

Eric, many thanks for that - I just about got there on my own, but it's good
to have it confirmed, especially that there's no Bind equivalent. I've now found the
line the Lambda docs which says,

"In sum, var(x) creates a nullary lambda functor, which stores a reference to the variable x. When the lambda functor is invoked, a reference to x is returned."

Which is exactly the answer I was looking for.

- Rob.

-----Berikut adalah Lampiran dalam Pesan-----

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net