I have a vector of shared_ptr, I want to combine boost shared_ptr and bind together.
My question is very similar to this, except that instead of "&MyClass::ReferenceFn" I would like to call "&Element::Fn".
Here is a similar piece of code:
typedef boost::shared_ptr< Vertex > vertex_ptr;
std::set<vertex_ptr> vertices;
void B::convert()
{
...
if( std::find_if(boost::make_indirect_iterator(vertices.begin()),
boost::make_indirect_iterator(vertices.end() ), boost::bind( &Vertex::id, boost::ref(*this), _1 ) == (*it)->id() ) == vertices.end() )
}
here is the error:
no matching function for call to ‘bind(<unresolved overloaded function type>, const boost::reference_wrapper<B>, boost::arg<1>&)’
NOTE: I am limited to use the C++03.