Boost logo

Boost :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2006-10-19 14:36:04


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Dean
> Michael Berris
> Sent: Thursday, October 19, 2006 10:46 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Runtime Dynamic Dispatch (boost-dispatch)
>
> Hi Sohail,
>
> On 10/20/06, Sohail Somani <s.somani_at_[hidden]> wrote:
> >
> > Is it not possible at all to have a d(1,2,3) interface?
> >
> > With the tuples, you are specifying the interface already.
> >
>
> I'm not sure what you mean by `d(1, 2, 3)'... If you have
> something like:
>
> void function(int a, int b, int c) {
> // do something with a, b, and c
> };
>
> dispatcher<void(int, int, int)> d;
> d[0] = &function;
> d[0](1, 2, 3);
>
> Then definitely that's possible.
>
> > It would be more natural.
>
> Can you elaborate on what you mean so that I don't
> misunderstand what you mean?

What I mean is overloading operator() with the types of the tuple so you
can call the dispatcher like a function.

Does that clarify?


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