hello,
I don't have much experience with boost, so I'm having problems getting boost
lambda to work...hope someone here can point me in the right direction.
I have:
class Song
{public:
string artist( ) const { return m_artist }
string title( ) const { return m_title }
private:
string m_artist, m_title;
}
typedef boost::shared_ptr<Song> pSong;
vector<pSong> c;
and I am trying to use lambda to find a song in c which matches a certain
artist and title...something like
iterator it = find_if( c.begin(), c.end(), something )
but I havn't figured out what "something" should look like
I've tried
find_if(begin(),end(), (_1->artist() == "a1" && _1->title = "t1" ) );
but the compiler -- or I =) -- doesn't seem to know the type of _1
--> error: base operand of `->' has non-pointer type `const
boost::lambda::lambda_functor