8 Dec
2009
8 Dec
'09
11:56 p.m.
On Tue, Dec 8, 2009 at 8:26 AM, Roman Perepelitsa
2009/12/8 Vadim Guchenko
Hello, All!
Is there a simple way to create a functor that returns one of its arguments _1, _2, ...?
In Boost.Lambda _2 is a functor that returns its second argument and constant(true) is a functor that always returns true. The same works with Boost.Phoenix.
What you are wanting is to return an argument, lazily. Boost.Bind is not built for that. Both Boost.Lambda and Boost.Phoenix are done lazily, and both do everything that Boost.Bind does, and Boost.Phoenix does everything that Boost.Lambda does.