Boost logo

Boost :

From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2007-09-06 10:42:24


On 9/6/07, Mathias Gaunard <mathias.gaunard_at_[hidden]> wrote:
> Marco Costalba wrote:
>
> > What I would need is an implementation of the following algorithm:
> >
> > foreach(f in Set)
> > if ( "f(v1,v2,..,vk)" is compilable )
> > return f;
>
> function_traits, SFINAE, and verbose meta-programming.
>

This would work if you were using something like Boost.Fusion in the
background where most of the processing is done at compile time.
However I believe the OP was looking for a solution at runtime, which
pretty hard to achieve if you're going to rely on RTTI.

I'm looking for a similar solution, but more towards improving
http://dispatcher.sourceforge.net/ to be able to support multiple
function signatures in a single dispatcher instance. I think I've got
a way to accomplish that with Boost.Fusion, but I doubt this same
approach you propose will work for runtime determination.

Unless I'm missing something, in which case please enlighten me.

Thanks!

-- 
Dean Michael C. Berris
http://cplusplus-soup.blogspot.com/
mikhailberis AT gmail DOT com
+63 928 7291459

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