Can we have a function pointer which points to a function which use a varying argument list? For example, lets say i need to select a function among a number of functions based on some input T 'input'. Can i use a STL map somthing like this??
template<typename T>
map<T, T (*)(T, ...)> func_map;
If this is possible can you tell me doing so will be right thing to do with design perspective.
[Edit] Actually i have a set of algorithmic functions and i have a message field. I need to select this algorithmic function based on few bytes values on this msg. I was thinking to use hash_map with a key value w.r.t. the pointer to that algorithmic function. i wanted to be very fast as per performance, what can be bast way to implement this.
Also, the reason why i am not selecting simple if-else or switch block for this is because the value which tell us the function that need to execute can refer to some other function at later point.