理解を深めるために、次の例の boost::bind への呼び出しを std::bind1st/2nd に置き換えてもよろしいですか? それとも、参照を返すために不可能ですか?
例(短縮):
class Pos
{
public:
bool operator==( const Pos& );
...
}
class X
{
public:
const Pos& getPos() { return m_p; }
...
private:
Pos m_p;
}
...
Pos position;
std::vector<X> v;
std::vector<X>::iterator iter;
...
iter = std::find_if( v.begin(), v.end(), boost::bind( &X::getPos, _1 ) == position );
...