Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-10-01 08:57:25

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


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at