Boost logo

Boost Users :

Subject: [Boost-users] [fusion?] [Phoenix?] Calling arbitrary method with collection of args
From: Nat Goodspeed (nat_at_[hidden])
Date: 2010-03-18 18:39:26


We have a data type equivalent to a recursive variant that can hold a
few scalar types or a vector of such types.

My colleague proposes that we build a template function that will accept
a free function or class method (that is, any callable whose signature
we can infer) plus a vector of the variant type. For each formal
parameter type in the callable's signature, this function would ensure
that the vector is long enough to fill it, and then that the runtime
type of the appropriate vector entry is compatible with the static type
of the parameter. Finally it would call the callable, filling the formal
parameters from the variant vector.

I strongly suspect that this function already exists in Boost. I simply
don't know which library to research. (OvermindDL1?)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net