I have a type, let's call it T. It can be of different types, and I do not know them in advance: int, double, bitmap pointer... Now, I have a class, let's call it C. It should maintain a vector of queues of T. Each queue has its unique type of elements, but it is possible that C has a vector (or whatever other way of maintaining multiple queues) with few queues of different types:
queue, queue, ...
So my question is: is there a way to pass variable number types to a class? Example: I need to get <int, double, double, int> and in a constructor, to create corresponding queues, plus I will need a function to get/put data to a particular queue (say, queue No 3 in a list).
I know about variadic templates, but can not figure how to use it: it looks like I have to do it recursively, and I am not that advanced...
I can do it using "any", but then get/put will have "any" as well, and I do not know how to do a type check, so the user doesn't send a double instead of string, or something like that.
Any ideas? Thanks.