Suppose I have the following class:
template <class T, class U, class V> Foo
{
...
};
The template parameters are clearly mapped, so I can infer other template arguments U and V based on what T. is. For example, if T is double, U and V will always be some classes D1 and D2, and if T is float, U and V there will always be some other classes F1 and F2.
With that in mind, is there a way I can only pass one template argument and force the compiler to output two other parameters?
I know that the simple answer would be to simply make these other classes templates and pass the template argument T to them, but I cannot make these classes templates (they are automatically generated by the tool).
Ideally, I could use typedef or #define like this:
typedef Foo<double> Foo<double, D1, D2>
typedef Foo<float> Foo<float, F1, F2>
. , , , , , , . - ?