[parameter]Boost Parameter and template template arguments
I have a class template with a large number of potential template parameters
where I would like to use boost parameter.
I understand that I can use integers with the int_<> wrapper, but is there
any trick or design pattern to allow template template's?
The problem is that I have class templates such as an interpolator which
will take in a type and a dimension size, and a variety of function objects
of the same type. If I can't use template templates, I am not sure how to
make the design sane.
For example, right now I have something like:
template
AMDG Jesse Perla wrote:
I have a class template with a large number of potential template parameters where I would like to use boost parameter. I understand that I can use integers with the int_<> wrapper, but is there any trick or design pattern to allow template template's? The problem is that I have class templates such as an interpolator which will take in a type and a dimension size, and a variety of function objects of the same type. If I can't use template templates, I am not sure how to make the design sane. For example, right now I have something like:
template
template Interpolator = cubic_spline> class DPP; I don't think I can write a free function to solve the instantiation difficulty since many of the types are only used internally and I couldn't use function template argument deduction.
Use mpl::lamdba expressions.
First you need to wrap any templates that take
non type template parameters. For example.
template
participants (2)
-
Jesse Perla
-
Steven Watanabe