I would like to use two containers, e.g. a deque and a vector, and use one or the other depending on certain conditions.
I would like to avoid the use of "if" and similar things, and efficency is critical.
The followin code explains what I mean, and of course it does not work:

Code:
   deque<C> dc;
   vector<C> vc;
   void *pc;
   pc = &dc;
   ...pc->...
...