Sorry for the TP.

Boost bind and boost lambda bind aren't 100% compatible yet. If you are delaying argument evaluation using _[0-9] then I think you *need* to use lambda bind.

-----Original Message-----
From: boost-users-bounces@lists.boost.org on behalf of Jason House
Sent: Sun 10/1/2006 8:52 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] [function] How do you bind twoboost::functionobjects together?

Sohail Somani wrote:
>>-----Original Message-----
>>From: boost-users-bounces@lists.boost.org
>>[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Jason House
>>
>>I want the result of the bound expression to have one input parameter
>>that would be decided later.  For instance:
>>
>>bool some_function(char x);
>>boost::function<bool (char) some_function_object(some_function);
>>boost::function<bool (int)> f = convert(some_function_object)
>>std::cout << f(32);
>
>
> I think what you're looking for is composition of functions? i.e. g o f
> (x) => g(f(x))?
>
> The right nomenclature might help... What it seems you want to do is to
> generate a function that does this:
>
> bool the_result(int i)
> {
>       return some_function(convert_to_char(int));
> }
>
> Is that right?
>
> I know you can curry with boost function + lambda but I haven't tried
> composition myself (though it should be possible!)

Yes, you're right.

It seems that my mistake was possibly that I was using
boost::lambda::bind instead of boost::bind.

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users