I have a typelist of the form described here:
http://www.drdobbs.com/generic-programmingtypelists-and-applica/184403813
Each type has a duck-typed function (template/compile-time virtual) called get() which returns a simple type like this:
struct Float {
float get() { return 7.0; }
};
struct Int {
int get() { return 7; }
};
typedef typelist<Float, typelist<Int, null_typelist>> types;
I also have a function that takes a variadic number of simple type arguments, like this:
template<typename... Args>
foo(Args... args)
{
}
Now I need a way to call foo given types. I think there's a solution to this, via a tuple, but I'm really far from a solution that works...
I hope you can help me here!
This code converts
typelisttotupleand callsfoowith simple types.live example