$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Allen Zhao (xlz_at_[hidden])
Date: 2006-01-04 19:27:56
Thank you so much, Peter.
Both suggested fixes works! Add a return type also resolves several 
other errors as well.
Best regards,
Allen Zhao
Peter Dimov wrote:
>Allen Zhao wrote:
>
>  
>
>>With regard to the boost:bind problem, I am not sure what happened.
>>BTW, anyone
>>knows the equalivalent form for the following nested bind:
>>
>>       struct peer
>>       {
>>           enum connection_type { not_connectable,connectable };
>>
>>           peer(const address& ip, connection_type t);
>>         ...
>>           peer_connection* connection;
>>       };
>>
>>      std::vector<peer> m_peers;
>>       peer_connection& c;
>>
>>
>>       assert(std::find_if(m_peers.begin(), m_peers.end()
>>           , boost::bind(std::equal_to<peer_connection*>(),
>>    
>>
>
>Try
>
>    boost::bind<bool>( std::equal_to<peer_connection*>(),
>
>  
>
>>               boost::bind(&peer::connection, _1)
>>               , &c)) != m_peers.end());
>>    
>>
>
>or possibly
>
>    boost::bind( &peer::connection, _1 ) == &c
>
>  
>
>>I am trying to invoke the predicate std:equal_to() directly,
>>therefore remove the first boost::bind()..
>>    
>>
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://listarchives.boost.org/mailman/listinfo.cgi/boost-users
>
>
>  
>