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*>(),


    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