From: Marco Costalba (mcostalba_at_[hidden])
Date: 2007-10-12 02:42:31
Now that we have an overload implementation I was starting to think
how to integrate Dean dispatcher with overload.
Integration from ABOVE:
a dispatcher holds a fusion::vector of overloads objects instead of
directly boost::functions, so that you can say
This is the most natural and most immediate approach.
But a perhaps more interesting approach is
Integration from BELOW:
In this case is overload that holds, instead of a tuple of
boost:function objects a tuple of dispatcher opbjects.
Currently dispatcher is single-signature, and this fits perfectly as a
replacement for boost::function as used in overload.
In this case we could have
overload<int(), int(int)> f;
f(); //calls foo1
f(); //calls foo2
f(7); //calls bar
Just some rough ideas to get some comments...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk