For example
class A {
public:
void fun(Array a);
void fun(Vector a);
/* Most codes in these two functions are same. */
/* Can certainly be merged into a template function if they were not member functions. */
}
Please note that I hope to have both these two versions of fun() in class A. Thanks.