This my first attempt at using the boost::mpl library, so I may be off
on the wrong track. If that's the case, please let me know and I'll
come up with a different way to solve my problem. This seemed like a
good practice case though. I'm trying to write a class that can test a
function (eventually any function). The idea is that you specialize
some number of arguments ( up to ten ) and then hand it a function.
Then you feed "test cases" into it, which consist of arguments and an
expected result.
It seemed to me that TMP might be the key avoid having to write the
template class 10 times (once for each number of template parameters).
I thought it would look something like this:
template
Michael Linck wrote:
Is there an elegant way to go from a vector of types to an argument list for another template? I would have to use this mechanism to also specialize various other functions, like the one that accepts sets of arguments, and some kind of struct for holding those arguments at run-time.
Boost.FunctionTypes might help in this case. BTW, I've implemented template arguments "projection": http://tinyurl.com/36kett Regards, -- Shunsuke Sogame
participants (2)
-
Michael Linck
-
shunsuke