Boost logo

Boost Users :

From: Duane Murphy (duanemurphy_at_[hidden])
Date: 2005-01-27 20:01:37

How do I work around this problem with bind?

#include <boost/bind.hpp>


class functions
        int func( int );
        int func( int, int );

void test()
        functions a_func;
                functions::func, a_func, 1, _1 );


Bind can't determine which function to call because it is overloaded and
it doesn't know the context in which it will be called.

With CodeWarrior 8 on Mac OS X I get "illegal use of template argument
dependent type 'T::result_type'

It references an "unspecified" template deep in the bowels of bind.

As I recall there was some way of helping bind to pick one of the
overloaded functions using a typedef or something similar. (Maybe that
was function?).

Thanks for any tips,


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at