>-----Original Message-----
>From: Aleksey Gurtovoy [mailto:[EMAIL PROTECTED] 
>Sent: Friday, August 08, 2003 4:27 AM
>To: Boost mailing list
>Subject: [boost] bind/lambda - unsupported use case?


>Consider the following snippet:
>
>    void show_warning( message_dialog const&, user_message );
>    void post_command( boost::function<void()> );
>
>    int main()
>    {
>        boost::function<void( user_message )> f( 
>              bind( &post_command
>                , ????( bind( &show_warning, message_dialog(), _1 ) )
>    //            ^^^^ what goes here?
>                )
>            );
>    }
>
>Could we make it work, somehow? Offers of a hand-written function 
>performing the composition are not accepted :)
>

>Aleksey

I'm a bit confused by your request,
 Do you want both fns to be called? in which case using <boost/lambda.hpp> and the 
operator,() between two bind statements?

as in:
  (bind(&post_command), bind(&show_warning, message_dialog(), _1) )

I haven't compiled it but it should call first the post_command, and then the 
show_warning with the argument.

  -Gary-
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to