
1 Oct
2007
1 Oct
'07
12:57 p.m.
Alexander Nasonov wrote:
Key difference between my interface and Joel's is that Joel sets overloads individually:
f.set<0>(&foo1); f.set<1>(&foo2); f.set<2>(&foo3); f.set<3>(&foo4);
while I expect a single functor supporting all overloads:
_1 + 1;
or
struct f { int operator(int) const; double operator(double) const; };
Yep. Both has its uses. I believe Alexander's code accepts only polymorphic functions. So, you can also use 'overloads' to gather the monomorphic functions and feed that to Alexander's. Cool stuff Alexander! I'd like to use dynamic_any in the lisp/scheme interpreter I'll be writing as an example for spirit2. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net