On Mon, 12 Sep 2005 23:31:52 -0300, Bruno MartÃnez
wrote:
Hi.
When using pointers to functions with bind, the particular function
doesn't play a part in the return value's type of bind. That is
void func1();
void func2();
typeid(boost::bind(&func1)) == typeid(boost::bind(&func1)) // this is
true
I've made some progress. What I have now looks like:
template
struct nontypeadapt;
template
struct nontypeadapt {
typedef Ret result_type;
Ret operator() () { return func(); }
};
then
typeid(boost::bind(nontypeadapt())) !=
typeid(boost::bind(nontypeadapt()))
However, the signature has to be given at the call site, it's repetitive
to define all specializations of nontypeadapt, and it brings more
forwarding problems of it's own. Any ideas?
Bruno