Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2005-02-12 04:25:03


Jonathan Turkanis wrote:
> I assume you're using id<..>'s to distinguish signatures even if they
agree at
> every other position. My initial guess is that operator()'s with the same
id<..>
> would correspond to functions having the same name. But then I see that
each
> operator() seems to have a unique id<..>, which make me wonder where the
> overloading is.

All ids are unique. This is how I can deduce a signature of every function
without ambiguity. Of course, these ids change original overloads relation
between functions but you can "bring it back" at call time:

Fsm fsm;
fsm(enable_all(), Passive(), EvActivate());
    ^^^^^^^^^^^^
enable_all is not yet in tarball but it's very simple. You just make sure
every id<N> has a constructor that accept enable_all.

>Okay, I think I understand this example.

>I'm not so sure I see how, or if, this relates to overload resolution. In
>addition to the associative sequence operators, I would expect to have a
>metafunction that takes an argument list and determines which overload is
>called.

Hmm, I'm not sure I can implemenent such metafunction because of complexity
of C++ rules. I have to look at details.

--
Alexander
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk