
Kim Kuen Tang wrote:
Nat Goodspeed schrieb:
I'm a bit surprised not to find existing support for std::vector; presumably that's been done a few times by individuals.
The size of std:::vector is not an mpl integral constant ( not known in compile time). So std::vector is not a sequence in the sense of fusion. See http://boost-spirit.com/dl_more/fusion_v2/libs/fusion/doc/html/fusion/sequen...
Then maybe boost::fusion::invoke() isn't what I'm looking for. Nonetheless it comes frustratingly close: the preprocessor iteration to handle various arities is already done. (In fact handling some number of C++ arities is (re)implemented in a surprising number of different Boost libraries.) Presumably Boost.Python has internal machinery very like what I want, receiving an arbitrary sequence of Python variant objects and using them to populate the parameter list of some C++ callable. Of course I don't want to start basing production code on an undocumented implementation detail, though. Still looking for a Boost feature to apply (e.g.) a std::vector of parameter values to a C++ callable... thanks for additional suggestions.