Say I have two classes A and B, and a vector of class A as below:
class A {
int foo;
int bar;
void someMet
You might be able to get away with making a union type C which can be read as int or uint and making a vector of that instead.
union C {
int s;
uint u;
};
std::vector va;
But that won't work if you need to pass it into a method that expects a vector.
In my opinion the right way to fix this is to make the method that expects a vector into a template so that it can accept any container type. Even better, make it like the STL methods and take an iterator or iterator pair.