Binding to an overloaded member function

How can I use boost bind to bind to an overloaded member function? I had working code for a member function: void C::dial(char key); But when I added: void C::dial(char key, MyConstants c); void C::dial(string toDial); void C::dial(string, MyConstants c); References to my working code break: for_each(begin, end, boost::bind(&C::dial, this, _1 )); Regards, Javier

Javier Estrada wrote:
How can I use boost bind to bind to an overloaded member function?
You have to cast explicitly to select the correct overload.
But when I added:
void C::dial(char key, MyConstants c); void C::dial(string toDial); void C::dial(string, MyConstants c);
References to my working code break:
for_each(begin, end, boost::bind(&C::dial, this, _1 ));
for_each(begin, end, boost::bind(
static_cast
participants (2)
-
Javier Estrada
-
Sebastian Redl