I'm trying to call boost::bind to create a function pointer to pass along to another function of mine.
However, when I make an attempt to do so, it fails miserably.
Here's how I'm doing it(this is the line causing the errors, if I comment it out, it compiles perfectly)
Code:
merc.connect_bcastCurId(boost::bind(&MusicInfo::update_currentSongTitle, this, boost::cref(merc), _1));
I'm trying to pass along the update_currentSongTitle function in my MusicInfo class, and also pass along a constant pointer to another object of mine, as the first argument in the update_currentSongTitle function.
Here's my prototype:
Code:
bool update_currentSongTitle(Merc const& merc, unsigned int const& id);
And here's my prototype for the function that takes the function pointer:
Code:
void connect_bcastCurId(boost::function<bool(Merc const&, unsigned int const&)> fp);
Here are my errors(I pastebin'ed them because they messed up the formatting if I pasted them into code tags):
http://pastebin.com/m58247670
Any help is appreciated, if you need more information, just ask and I'll provide it.
Thanks.