
20 May
2005
20 May
'05
4:27 p.m.
David Abrahams <dave@boost-consulting.com> writes:
I don't see how this can work.
P p; Q q;
extern "C" int (*f1)(int) = make_c_function<P,int(int)>(boost::bind(&p,P::foo,_1));
extern "C" int (*f2)(int) = make_c_function<P,int(int)>(boost::bind(&q,P::foo,_1));
Don't these call the same function with the same stored data?
ooh, sneaky idea... do you specailize a class template on the address of the argument to make_c_function, thus generating unique functions?
Oh, of course you can't do that; the argument is a runtime argument. How can it possibly work? -- Dave Abrahams Boost Consulting www.boost-consulting.com