|
Boost : |
From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2008-05-28 12:09:53
On Tue, May 20, 2008 at 1:16 PM, Marco Costalba <mcostalba_at_[hidden]> wrote:
> On Tue, May 20, 2008 at 5:35 AM, Daniel Walker
> <daniel.j.walker_at_[hidden]> wrote:
>>
>> See what I'm getting at?
>>
>
> More or less ;-)
>
> I 'm really eager to see the code you are working on to finally
> understand without ambiguities.
Sorry for the delay. I just put it on vault. Once I got my hands
dirty, I wanted to try to get it right. I think it's pretty close to
production grade, now. And yeah, there's nothing like code to resolve
ambiguities; working on this helped me clarify my own thinking as
well. One thing I realized is that I was probably wrong about the
modifications you need in order to enable polymorphic signatures:
> <daniel.j.walker_at_[hidden]> wrote:
> I think the simplest way to implement this would be to
> replace the internal boost::function with polymorphic_function and add
> a function_caller that isn't partially specialized on the decomposed
> signature. This general function_caller would dispatch rank-n
> polymorphic calls.
I'm not sure that this is actual true, because like boost::function,
each polymorphic_function can only be called by one signature. Each
function_caller holds only one call wrapper, right? So, the example I
gave where the function_caller overloaded operator() for different
arities and forwarded to the same underlying call wrapper isn't
correct. I'm not sure what the best way of going about this is, but we
have a working version of polymorphic_function to play around with
now, which may help.
Daniel Walker
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk